Author: koen.aers(a)jboss.com
Date: 2008-11-25 14:14:04 -0500 (Tue, 25 Nov 2008)
New Revision: 12043
Added:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java
Log:
package rename to org.jboss.tools.flow.common.properties
Copied:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties
(from rev 10887,
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties)
Property changes on:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties
___________________________________________________________________
Name: svn:mergeinfo
+
Copied:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java
(from rev 10900,
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultContainerPropertySource.java)
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java 2008-11-25
19:14:04 UTC (rev 12043)
@@ -0,0 +1,50 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultContainerWrapper;
+
+public class DefaultContainerPropertySource implements IPropertySource {
+
+ private static final String NAME =
"org.jboss.tools.flow.common.model.DefaultContainer.name";
+
+ private DefaultContainerWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultContainerPropertySource(DefaultContainerWrapper wrapper) {
+ this.wrapper = wrapper;
+ }
+ public Object getEditableValue() {
+ return null;
+ }
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ }
+ return propertyDescriptors;
+ }
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName();
+ }
+ return null;
+ }
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ }
+ return false;
+ }
+ public void resetPropertyValue(Object id) {
+ }
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ }
+ }
+}
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultFlowPropertySource.java 2008-10-16
14:14:51 UTC (rev 10887)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java 2008-11-25
19:14:04 UTC (rev 12043)
@@ -1,4 +1,4 @@
-package org.jboss.tools.common.properties;
+package org.jboss.tools.flow.common.properties;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
Copied:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java
(from rev 11819,
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/common/properties/DefaultNodePropertySource.java)
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java 2008-11-25
19:14:04 UTC (rev 12043)
@@ -0,0 +1,50 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultNodeWrapper;
+
+public class DefaultNodePropertySource implements IPropertySource {
+
+ private static final String NAME =
"org.jboss.tools.flow.common.model.DefaultNode.name";
+
+ private DefaultNodeWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultNodePropertySource(DefaultNodeWrapper wrapper) {
+ this.wrapper = wrapper;
+ }
+ public Object getEditableValue() {
+ return null;
+ }
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ }
+ return propertyDescriptors;
+ }
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null ? wrapper.getName() : "";
+ }
+ return null;
+ }
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ }
+ return false;
+ }
+ public void resetPropertyValue(Object id) {
+ }
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ }
+ }
+}
Show replies by date