hdt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ad...@apache.org
Subject [12/17] git commit: moved over the property testers, adds dependency on wst
Date Mon, 28 Jan 2013 03:44:44 GMT
moved over the property testers, adds dependency on wst

Project: http://git-wip-us.apache.org/repos/asf/incubator-hdt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hdt/commit/ed088dfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hdt/tree/ed088dfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hdt/diff/ed088dfe

Branch: refs/heads/master
Commit: ed088dfe3fb86a057e375a9520e79113a9bd9dcf
Parents: dfd5c57
Author: adamb <adamb@apache.org>
Authored: Thu Jan 24 17:11:55 2013 -0600
Committer: adamb <adamb@apache.org>
Committed: Thu Jan 24 17:11:55 2013 -0600

----------------------------------------------------------------------
 org.apache.hdt.core/META-INF/MANIFEST.MF           |    4 +-
 org.apache.hdt.core/plugin.xml                     |   17 ++++++
 .../src/org/apache/hdt/core/PropertyTester.java    |   43 +++++++++++++++
 3 files changed, 63 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/ed088dfe/org.apache.hdt.core/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/META-INF/MANIFEST.MF b/org.apache.hdt.core/META-INF/MANIFEST.MF
index e491870..b2eae6b 100644
--- a/org.apache.hdt.core/META-INF/MANIFEST.MF
+++ b/org.apache.hdt.core/META-INF/MANIFEST.MF
@@ -7,7 +7,9 @@ Bundle-Activator: org.apache.hdt.core.Activator
 Bundle-Vendor: Apache Software Foundation
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources,
- org.eclipse.jdt.core
+ org.eclipse.jdt.core,
+ org.eclipse.core.expressions,
+ org.eclipse.wst.server.core
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Export-Package: org.apache.hdt.core,

http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/ed088dfe/org.apache.hdt.core/plugin.xml
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/plugin.xml b/org.apache.hdt.core/plugin.xml
index fbed8c5..571628a 100644
--- a/org.apache.hdt.core/plugin.xml
+++ b/org.apache.hdt.core/plugin.xml
@@ -11,5 +11,22 @@
          </run>
       </runtime>
    </extension>
+   <extension
+         point="org.eclipse.core.expressions.propertyTesters">
+      <propertyTester
+            class="org.apache.hdt.core.PropertyTester"
+            id="org.apache.hdt.core.mapreduce.deployable"
+            namespace="mapreduce"
+            properties="deployable"
+            type="org.eclipse.core.resources.IResource">
+      </propertyTester>
+      <propertyTester
+            class="org.apache.hdt.core.PropertyTester"
+            id="org.apache.hdt.core.mapreduce.server"
+            namespace="mapreduce"
+            properties="server"
+            type="org.eclipse.wst.server.core.IServer">
+      </propertyTester>
+   </extension>
 
 </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/ed088dfe/org.apache.hdt.core/src/org/apache/hdt/core/PropertyTester.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/PropertyTester.java b/org.apache.hdt.core/src/org/apache/hdt/core/PropertyTester.java
new file mode 100644
index 0000000..76fbf10
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/PropertyTester.java
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hdt.core;
+
+import java.util.logging.Logger;
+
+/**
+ * Class to help with debugging properties
+ */
+public class PropertyTester extends
+    org.eclipse.core.expressions.PropertyTester {
+
+  static Logger log = Logger.getLogger(PropertyTester.class.getName());
+
+  public PropertyTester() {
+  }
+
+  public boolean test(Object receiver, String property, Object[] args,
+      Object expectedValue) {
+    log.fine("Test property " + property + ", " + receiver.getClass());
+
+    return true;
+
+    // todo(jz) support test for deployable if module has hadoop nature etc.
+  }
+
+}


Mime
View raw message