Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2013-01-22 15:15:15 -0500
committerBrian Vosburgh2013-01-22 16:47:02 -0500
commit68b8abab75e757b9f4baf4d72c8f551d64e6d9ad (patch)
tree84935c7ee03d2edd386ee3f233eb5064054fa63a
parent4458d9843872174d79c0612edd90ae3d0534517b (diff)
downloadwebtools.dali-68b8abab75e757b9f4baf4d72c8f551d64e6d9ad.tar.gz
webtools.dali-68b8abab75e757b9f4baf4d72c8f551d64e6d9ad.tar.xz
webtools.dali-68b8abab75e757b9f4baf4d72c8f551d64e6d9ad.zip
add some platform adapters
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceChangeAdapter.java30
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceProxyVisitorAdapter.java31
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ElementChangedAdapter.java30
3 files changed, 91 insertions, 0 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceChangeAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceChangeAdapter.java
new file mode 100644
index 0000000000..7a90f6210c
--- /dev/null
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceChangeAdapter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.common.core.internal.utility;
+
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.jpt.common.utility.internal.ObjectTools;
+
+/**
+ * Convenience implementation of {@link IResourceChangeListener}.
+ */
+public class ResourceChangeAdapter
+ implements IResourceChangeListener
+{
+ public void resourceChanged(IResourceChangeEvent event) {
+ // NOP
+ }
+
+ @Override
+ public String toString() {
+ return ObjectTools.toString(this);
+ }
+}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceProxyVisitorAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceProxyVisitorAdapter.java
new file mode 100644
index 0000000000..dcec1fd954
--- /dev/null
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/ResourceProxyVisitorAdapter.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.common.core.internal.utility;
+
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jpt.common.utility.internal.ObjectTools;
+
+/**
+ * Convenience implementation of {@link IResourceProxyVisitor}.
+ */
+public class ResourceProxyVisitorAdapter
+ implements IResourceProxyVisitor
+{
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return ObjectTools.toString(this);
+ }
+}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ElementChangedAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ElementChangedAdapter.java
new file mode 100644
index 0000000000..200f815769
--- /dev/null
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ElementChangedAdapter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.common.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jpt.common.utility.internal.ObjectTools;
+
+/**
+ * Convenience implementation of {@link IElementChangedListener}.
+ */
+public class ElementChangedAdapter
+ implements IElementChangedListener
+{
+ public void elementChanged(ElementChangedEvent event) {
+ // NOP
+ }
+
+ @Override
+ public String toString() {
+ return ObjectTools.toString(this);
+ }
+}

Back to the top