Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 132391 Details for
Bug 266922
[ds tooling] add a modified attribute to component
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.pde.ds.patch
clipboard.txt (text/plain), 12.07 KB, created by
Chris Aniszczyk
on 2009-04-20 06:17:55 EDT
(
hide
)
Description:
org.eclipse.pde.ds.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2009-04-20 06:17:55 EDT
Size:
12.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ds.tests >Index: src/org/eclipse/pde/internal/ds/tests/DSComponentTestCase.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.tests/src/org/eclipse/pde/internal/ds/tests/DSComponentTestCase.java,v >retrieving revision 1.9 >diff -u -r1.9 DSComponentTestCase.java >--- src/org/eclipse/pde/internal/ds/tests/DSComponentTestCase.java 2 Mar 2009 14:25:47 -0000 1.9 >+++ src/org/eclipse/pde/internal/ds/tests/DSComponentTestCase.java 20 Apr 2009 10:18:30 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.pde.internal.ds.core.IDSService; > > public class DSComponentTestCase extends AbstractDSModelTestCase { >- >+ > public void testAddDefaultComponent() { > StringBuffer buffer = new StringBuffer(); > setXMLContents(buffer, LF); >@@ -29,11 +29,12 @@ > > IDSComponent component = fModel.getDSComponent(); > assertNotNull(component); >- >+ > assertEquals(component.getName(), COMPONENT_NAME); > assertEquals(component.getActivateMethod(), null); > assertEquals(component.getDeactivateMethod(), null); >- >+ assertEquals(component.getModifiedMethod(), null); >+ > assertTrue(component.getEnabled()); > } > >@@ -44,7 +45,7 @@ > > IDSComponent component = fModel.getDSComponent(); > assertNotNull(component); >- >+ > assertEquals(component.getName(), COMPONENT_NAME); > component.setEnabled(false); > component.setAttributeName("NewName"); >@@ -52,15 +53,16 @@ > component.setImmediate(true); > component.setActivateMethod("start"); > component.setDeactivateMethod("stop"); >- >+ component.setModifiedeMethod("modified"); >+ > assertFalse(component.getEnabled()); > assertEquals(component.getAttributeName(), "NewName"); > assertEquals(component.getFactory(), "NewFactory"); > assertTrue(component.getImmediate()); > assertEquals(component.getActivateMethod(), "start"); > assertEquals(component.getDeactivateMethod(), "stop"); >+ assertEquals(component.getModifiedMethod(), "modified"); > } >- > > public void testAddMoveRemoveChildrens() { > StringBuffer buffer = new StringBuffer(); >@@ -69,48 +71,47 @@ > > IDSComponent component = fModel.getDSComponent(); > assertNotNull(component); >- >+ > IDSDocumentFactory factory = fModel.getFactory(); >- >+ > IDSImplementation implementation = factory.createImplementation(); > implementation.setClassName("ImplementationClassName"); > component.setImplementation(implementation); >- >+ > IDSProperties properties = factory.createProperties(); > properties.setEntry("PropertiesEntry"); > component.addPropertiesElement(properties); >- >+ > IDSProperty property = factory.createProperty(); > property.setPropertyElemBody("Body Values"); > property.setPropertyType("java.lang.String"); > component.addPropertyElement(property); >- >+ > IDSService service = factory.createService(); > service.setServiceFactory(true); > component.setService(service); >- >+ > IDSReference reference = factory.createReference(); > reference.setReferenceBind("methodBind"); > reference.setReferenceUnbind("methodUnBind"); > reference.setReferenceInterface("ReferenceInterface"); > reference.setReferenceName("ReferenceName"); > component.addReference(reference); >- >+ > IDocumentElementNode childAt4 = component.getChildAt(4); > component.moveChildNode(reference, -1, true); >- >+ > IDocumentElementNode childAt3 = component.getChildAt(3); >- >+ > assertEquals(childAt4, childAt3); >- >- >+ > assertTrue(component.getChildCount() == 5); > assertTrue(component.getImplementation() != null); > assertTrue(component.getPropertyElements().length == 1); > assertTrue(component.getPropertiesElements().length == 1); > assertTrue(component.getService() != null); > assertTrue(component.getReferences().length == 1); >- >+ > component.removeReference(reference); > assertTrue(component.getChildCount() == 4); > assertTrue(component.getImplementation() != null); >@@ -118,7 +119,6 @@ > assertTrue(component.getPropertiesElements().length == 1); > assertTrue(component.getService() != null); > assertTrue(component.getReferences().length == 0); >- > > component.removeService(service); > component.removePropertiesElement(properties); >@@ -128,7 +128,6 @@ > assertTrue(component.getPropertiesElements().length == 0); > assertTrue(component.getService() == null); > assertTrue(component.getReferences().length == 0); >- > > component.removeChildNode(implementation); > component.removePropertyElement(property); >@@ -138,7 +137,7 @@ > assertTrue(component.getPropertiesElements().length == 0); > assertTrue(component.getService() == null); > assertTrue(component.getReferences().length == 0); >- >+ > } > > } >#P org.eclipse.pde.ds.core >Index: src/org/eclipse/pde/internal/ds/core/IDSConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/IDSConstants.java,v >retrieving revision 1.12 >diff -u -r1.12 IDSConstants.java >--- src/org/eclipse/pde/internal/ds/core/IDSConstants.java 24 Feb 2009 03:05:01 -0000 1.12 >+++ src/org/eclipse/pde/internal/ds/core/IDSConstants.java 20 Apr 2009 10:18:32 -0000 >@@ -38,6 +38,7 @@ > public static final String ATTRIBUTE_COMPONENT_CONFIGURATION_POLICY = "configuration-policy"; //$NON-NLS-1$ > public static final String ATTRIBUTE_COMPONENT_ACTIVATE = "activate"; //$NON-NLS-1$ > public static final String ATTRIBUTE_COMPONENT_DEACTIVATE = "deactivate"; //$NON-NLS-1$ >+ public static final String ATTRIBUTE_COMPONENT_MODIFIED = "modified"; //$NON-NLS-1$ > > //Implementation Attributes > public static final String ATTRIBUTE_IMPLEMENTATION_CLASS = "class"; //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/ds/core/IDSComponent.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/IDSComponent.java,v >retrieving revision 1.9 >diff -u -r1.9 IDSComponent.java >--- src/org/eclipse/pde/internal/ds/core/IDSComponent.java 8 Feb 2009 14:05:02 -0000 1.9 >+++ src/org/eclipse/pde/internal/ds/core/IDSComponent.java 20 Apr 2009 10:18:32 -0000 >@@ -110,6 +110,21 @@ > public String getDeactivateMethod(); > > /** >+ * Sets the value of the modified method signature name >+ * >+ * @param name >+ * String value of the modified method signature name >+ */ >+ public void setModifiedeMethod(String name); >+ >+ /** >+ * Returns the value of the modified method signature name >+ * >+ * @return String value of the modified method signature name >+ */ >+ public String getModifiedMethod(); >+ >+ /** > * Sets the value of the attribute immediate > * > * @param bool >Index: src/org/eclipse/pde/internal/ds/core/text/DSComponent.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSComponent.java,v >retrieving revision 1.22 >diff -u -r1.22 DSComponent.java >--- src/org/eclipse/pde/internal/ds/core/text/DSComponent.java 24 Feb 2009 16:26:08 -0000 1.22 >+++ src/org/eclipse/pde/internal/ds/core/text/DSComponent.java 20 Apr 2009 10:18:32 -0000 >@@ -329,7 +329,8 @@ > IDSConstants.ATTRIBUTE_COMPONENT_NAME, > IDSConstants.ATTRIBUTE_COMPONENT_CONFIGURATION_POLICY, > IDSConstants.ATTRIBUTE_COMPONENT_ACTIVATE, >- IDSConstants.ATTRIBUTE_COMPONENT_DEACTIVATE }; >+ IDSConstants.ATTRIBUTE_COMPONENT_DEACTIVATE, >+ IDSConstants.ATTRIBUTE_COMPONENT_MODIFIED }; > } > > public String getConfigurationPolicy() { >@@ -356,4 +357,12 @@ > setXMLAttribute(ATTRIBUTE_COMPONENT_DEACTIVATE, name); > } > >+ public String getModifiedMethod() { >+ return getXMLAttributeValue(ATTRIBUTE_COMPONENT_MODIFIED); >+ } >+ >+ public void setModifiedeMethod(String name) { >+ setXMLAttribute(ATTRIBUTE_COMPONENT_MODIFIED, name); >+ } >+ > } >#P org.eclipse.pde.ds.ui >Index: src/org/eclipse/pde/internal/ds/ui/Messages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/Messages.java,v >retrieving revision 1.27 >diff -u -r1.27 Messages.java >--- src/org/eclipse/pde/internal/ds/ui/Messages.java 25 Feb 2009 21:35:38 -0000 1.27 >+++ src/org/eclipse/pde/internal/ds/ui/Messages.java 20 Apr 2009 10:18:33 -0000 >@@ -30,6 +30,8 @@ > public static String DSComponentDetails_activateTooltip; > public static String DSComponentDetails_deactivateEntry; > public static String DSComponentDetails_deactivateTooltip; >+ public static String DSComponentDetails_modifiedEntry; >+ public static String DSComponentDetails_modifiedTooltip; > public static String DSComponentDetails_factoryEntry; > public static String DSComponentDetails_configurationPolicy; > public static String DSComponentDetails_enabledLabel; >Index: src/org/eclipse/pde/internal/ds/ui/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/messages.properties,v >retrieving revision 1.45 >diff -u -r1.45 messages.properties >--- src/org/eclipse/pde/internal/ds/ui/messages.properties 10 Mar 2009 18:19:46 -0000 1.45 >+++ src/org/eclipse/pde/internal/ds/ui/messages.properties 20 Apr 2009 10:18:33 -0000 >@@ -7,6 +7,7 @@ > # > # Contributors: > # IBM Corporation - initial API and implementation >+# EclipseSource Corporation - ongoing enhancements > ############################################################################### > > >@@ -23,6 +24,8 @@ > DSComponentDetails_activateTooltip=The activate method name > DSComponentDetails_deactivateEntry=Deactivate: > DSComponentDetails_deactivateTooltip=The deactivate method name >+DSComponentDetails_modifiedEntry=Modified: >+DSComponentDetails_modifiedTooltip=The modified method name > DSComponentDetails_factoryEntry=Factory ID: > DSComponentDetails_configurationPolicy=Configuration Policy: > DSComponentDetails_enabledLabel=Enabled: >Index: src/org/eclipse/pde/internal/ds/ui/editor/sections/DSComponentSection.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSComponentSection.java,v >retrieving revision 1.4 >diff -u -r1.4 DSComponentSection.java >--- src/org/eclipse/pde/internal/ds/ui/editor/sections/DSComponentSection.java 8 Feb 2009 14:05:01 -0000 1.4 >+++ src/org/eclipse/pde/internal/ds/ui/editor/sections/DSComponentSection.java 20 Apr 2009 10:18:33 -0000 >@@ -56,6 +56,7 @@ > private FormEntry fNameEntry; > private FormEntry fActivateEntry; > private FormEntry fDeactivateEntry; >+ private FormEntry fModifiedEntry; > private IDSModel fModel; > > public DSComponentSection(PDEFormPage page, Composite parent) { >@@ -98,6 +99,12 @@ > Messages.DSComponentDetails_deactivateEntry, SWT.NONE); > fDeactivateEntry.getLabel().setToolTipText( > Messages.DSComponentDetails_deactivateTooltip); >+ >+ // Attribute: modified >+ fModifiedEntry = new FormEntry(client, toolkit, >+ Messages.DSComponentDetails_deactivateEntry, SWT.NONE); >+ fModifiedEntry.getLabel().setToolTipText( >+ Messages.DSComponentDetails_deactivateTooltip); > > setListeners(); > updateUIFields(); >@@ -122,6 +129,7 @@ > fNameEntry.commit(); > fActivateEntry.commit(); > fDeactivateEntry.commit(); >+ fModifiedEntry.commit(); > super.commit(onSave); > } > >@@ -170,8 +178,14 @@ > fDeactivateEntry.setValue(fComponent.getDeactivateMethod(), > true); > } >- > fDeactivateEntry.setEditable(isEditable()); >+ >+ if (fComponent.getModifiedMethod() == null) { >+ fModifiedEntry.setValue("", true); //$NON-NLS-1$ >+ } else { >+ fModifiedEntry.setValue(fComponent.getModifiedMethod(), true); >+ } >+ fModifiedEntry.setEditable(isEditable()); > } > > // Ensure data object is defined >@@ -217,6 +231,15 @@ > fComponent.setDeactivateMethod(fDeactivateEntry.getValue()); > } > }); >+ fModifiedEntry.setFormEntryListener(new FormEntryAdapter(this) { >+ public void textValueChanged(FormEntry entry) { >+ // Ensure data object is defined >+ if (fComponent == null) { >+ return; >+ } >+ fComponent.setModifiedeMethod(fModifiedEntry.getValue()); >+ } >+ }); > > IActionBars actionBars = this.getPage().getEditor().getEditorSite() > .getActionBars();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266922
: 132391