Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/merge/PapyrusResourceAttachmentChangeMerger.java11
-rw-r--r--plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/tooltip/AbstractTooltipProvider.java9
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/EMFCompareTestConfiguration.java5
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/handler/EMFComparisonSourceActionHandler.java3
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/EnginesPreferencePage.java6
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/FiltersPreferencePage.java6
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java3
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/provider/TreeNodeItemProviderSpec.java3
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java3
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java179
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java217
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java157
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java128
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java160
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java84
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java362
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java128
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java134
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java277
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java151
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java207
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java126
-rw-r--r--tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java160
23 files changed, 1020 insertions, 1499 deletions
diff --git a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/merge/PapyrusResourceAttachmentChangeMerger.java b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/merge/PapyrusResourceAttachmentChangeMerger.java
index dccc533b1..ee4400975 100644
--- a/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/merge/PapyrusResourceAttachmentChangeMerger.java
+++ b/plugins/org.eclipse.emf.compare.diagram.ide.ui.papyrus/src/org/eclipse/emf/compare/diagram/ide/ui/papyrus/internal/merge/PapyrusResourceAttachmentChangeMerger.java
@@ -206,12 +206,11 @@ public class PapyrusResourceAttachmentChangeMerger extends ResourceAttachmentCha
try {
toDelete.delete(Collections.EMPTY_MAP);
} catch (IOException e) {
- CompareDiagramIDEUIPapyrusPlugin.getDefault()
- .getLog().log(
- new Status(IStatus.ERROR,
- CompareDiagramIDEUIPapyrusPlugin.PLUGIN_ID, CompareUIPapyrusMessages
- .getString("PapyrusResourceAttachmentChangeMerge.deleteFailure"), //$NON-NLS-1$
- e));
+ CompareDiagramIDEUIPapyrusPlugin.getDefault().getLog()
+ .log(new Status(IStatus.ERROR, CompareDiagramIDEUIPapyrusPlugin.PLUGIN_ID,
+ CompareUIPapyrusMessages
+ .getString("PapyrusResourceAttachmentChangeMerge.deleteFailure"), //$NON-NLS-1$
+ e));
}
}
diff --git a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/tooltip/AbstractTooltipProvider.java b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/tooltip/AbstractTooltipProvider.java
index 6edfc589a..04c11d698 100644
--- a/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/tooltip/AbstractTooltipProvider.java
+++ b/plugins/org.eclipse.emf.compare.edit/src/org/eclipse/emf/compare/tooltip/AbstractTooltipProvider.java
@@ -474,8 +474,7 @@ public abstract class AbstractTooltipProvider<T extends Diff> extends AdapterImp
if (isFromLeft) {
if ("".equals(rightValue)) { //$NON-NLS-1$
body = getString("ContextualTooltip.set.left.leftToRight.empty", //$NON-NLS-1$
- structuralFeatureName,
- containerName, leftValue);
+ structuralFeatureName, containerName, leftValue);
} else {
body = getString("ContextualTooltip.set.left.leftToRight", structuralFeatureName, //$NON-NLS-1$
@@ -506,8 +505,7 @@ public abstract class AbstractTooltipProvider<T extends Diff> extends AdapterImp
} else {
if ("".equals(leftValue)) { //$NON-NLS-1$
body = getString("ContextualTooltip.set.right.rightToLeft.empty", //$NON-NLS-1$
- structuralFeatureName,
- containerName, rightValue);
+ structuralFeatureName, containerName, rightValue);
} else {
body = getString("ContextualTooltip.set.right.rightToLeft", structuralFeatureName, //$NON-NLS-1$
containerName, rightValue, leftValue);
@@ -563,8 +561,7 @@ public abstract class AbstractTooltipProvider<T extends Diff> extends AdapterImp
containerName);
} else {
body = getString("ContextualTooltip.set.right.reject", previousValue, //$NON-NLS-1$
- structuralFeatureName,
- containerName);
+ structuralFeatureName, containerName);
}
tooltip = rejectAndUnchanged(body);
}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/EMFCompareTestConfiguration.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/EMFCompareTestConfiguration.java
index 739beca62..efbdf7fd1 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/EMFCompareTestConfiguration.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.framework/src/org/eclipse/emf/compare/ide/ui/tests/framework/EMFCompareTestConfiguration.java
@@ -51,8 +51,9 @@ public class EMFCompareTestConfiguration {
* @param disabledPostProcessors
* The post processors disabled for the test
*/
- public EMFCompareTestConfiguration(Class<?>[] disabledMatchEngineFactory, Class<?> diffEngine, Class<?> eqEngine,
- Class<?> reqEngine, Class<?> conflictDetector, Class<?>[] disabledPostProcessors) {
+ public EMFCompareTestConfiguration(Class<?>[] disabledMatchEngineFactory, Class<?> diffEngine,
+ Class<?> eqEngine, Class<?> reqEngine, Class<?> conflictDetector,
+ Class<?>[] disabledPostProcessors) {
this.disabledMatchEngines = disabledMatchEngineFactory;
this.diffEngine = diffEngine;
this.eqEngine = eqEngine;
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/handler/EMFComparisonSourceActionHandler.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/handler/EMFComparisonSourceActionHandler.java
index 48ef41907..c1edb55f0 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/handler/EMFComparisonSourceActionHandler.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/handler/EMFComparisonSourceActionHandler.java
@@ -119,8 +119,7 @@ public class EMFComparisonSourceActionHandler extends AbstractHandler {
String inputTitle = MessageFormat.format(
EMFCompareIDEUIMessages.getString("EMFComparisonSourceActionHandler_InputTitle_Base"), //$NON-NLS-1$
- leftSource.getName(), rightSource
- .getName());
+ leftSource.getName(), rightSource.getName());
if (originSource != null) {
inputTitle += MessageFormat.format(
' ' + EMFCompareIDEUIMessages
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/EnginesPreferencePage.java b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/EnginesPreferencePage.java
index 9892e3e34..dce91d0b4 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/EnginesPreferencePage.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/EnginesPreferencePage.java
@@ -229,8 +229,7 @@ public class EnginesPreferencePage extends PreferencePage implements IWorkbenchP
// Create tab structure
Composite tabComposite = createTabSkeleton(tabFolder,
EMFCompareRCPUIMessages.getString("EnginesPreferencePage.differenceEngine.tab.label"), //$NON-NLS-1$
- EMFCompareRCPUIMessages
- .getString("EnginesPreferencePage.diffEngineIntro.text")); //$NON-NLS-1$
+ EMFCompareRCPUIMessages.getString("EnginesPreferencePage.diffEngineIntro.text")); //$NON-NLS-1$
InteractiveUIContent interactiveContent = createEngineUIBuilder(diffEngineDescriptorRegistry,
EMFComparePreferences.DIFF_ENGINES,
@@ -253,8 +252,7 @@ public class EnginesPreferencePage extends PreferencePage implements IWorkbenchP
.getItemDescriptor(DefaultRCPMatchEngineFactory.class.getCanonicalName());
Composite tabComposite = createTabSkeleton(tabFolder,
EMFCompareRCPUIMessages.getString("EnginesPreferencePage.matchEngine.tab.label"), //$NON-NLS-1$
- EMFCompareRCPUIMessages
- .getString("EnginesPreferencePage.matchEngineIntro.text")); //$NON-NLS-1$
+ EMFCompareRCPUIMessages.getString("EnginesPreferencePage.matchEngineIntro.text")); //$NON-NLS-1$
Map<String, IConfigurationUIFactory> configuratorUIRegistry = EMFCompareRCPUIPlugin.getDefault()
.getMatchEngineConfiguratorRegistry();
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/FiltersPreferencePage.java b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/FiltersPreferencePage.java
index 1cacbbe8f..6cb20c08e 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/FiltersPreferencePage.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/preferences/FiltersPreferencePage.java
@@ -124,8 +124,7 @@ public class FiltersPreferencePage extends PreferencePage implements IWorkbenchP
private void createDefaultEnabledFilterTab(TabFolder tabFolder) {
enabledFilterTabComposite = createTabSkeleton(tabFolder,
EMFCompareRCPUIMessages.getString("FiltersPreferencePage.select.tab.label"), //$NON-NLS-1$
- EMFCompareRCPUIMessages
- .getString("FiltersPreferencePage.selectIntro.text")); //$NON-NLS-1$
+ EMFCompareRCPUIMessages.getString("FiltersPreferencePage.selectIntro.text")); //$NON-NLS-1$
if (filterManager == null) {
filterManager = EMFCompareRCPUIPlugin.getDefault().getDifferenceFilterManager();
}
@@ -142,8 +141,7 @@ public class FiltersPreferencePage extends PreferencePage implements IWorkbenchP
private void createActivateFilterTab(TabFolder tabFolder) {
activateFilterTabComposite = createTabSkeleton(tabFolder,
EMFCompareRCPUIMessages.getString("FiltersPreferencePage.activate.tab.label"), //$NON-NLS-1$
- EMFCompareRCPUIMessages
- .getString("FiltersPreferencePage.activateIntro.text")); //$NON-NLS-1$
+ EMFCompareRCPUIMessages.getString("FiltersPreferencePage.activateIntro.text")); //$NON-NLS-1$
if (filterManager == null) {
filterManager = EMFCompareRCPUIPlugin.getDefault().getDifferenceFilterManager();
}
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
index 2a7ab755c..9db1aa329 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
@@ -134,8 +134,7 @@ public class BasicDifferenceGroupImpl extends AdapterImpl implements IDifference
public BasicDifferenceGroupImpl(Comparison comparison, Predicate<? super Diff> filter,
ECrossReferenceAdapter crossReferenceAdapter) {
this(comparison, filter, EMFCompareRCPUIMessages.getString("BasicDifferenceGroup.name"), //$NON-NLS-1$
- EMFCompareRCPUIPlugin
- .getImage("icons/full/toolb16/group.gif"), //$NON-NLS-1$
+ EMFCompareRCPUIPlugin.getImage("icons/full/toolb16/group.gif"), //$NON-NLS-1$
crossReferenceAdapter);
}
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/provider/TreeNodeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/provider/TreeNodeItemProviderSpec.java
index 704984b3f..cb6149924 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/provider/TreeNodeItemProviderSpec.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/provider/TreeNodeItemProviderSpec.java
@@ -289,8 +289,7 @@ public class TreeNodeItemProviderSpec extends TreeNodeItemProvider implements II
ret.append(
" [" //$NON-NLS-1$
+ EMFCompareEditMessages.getString("unresolved", //$NON-NLS-1$
- Integer.valueOf(unresolvedDiffCount),
- Integer.valueOf(d.size()))
+ Integer.valueOf(unresolvedDiffCount), Integer.valueOf(d.size()))
+ "]", //$NON-NLS-1$
Style.DECORATIONS_STYLER);
} else {
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
index 0b66e2724..0ce16ab85 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/merge/ComplexMergeTest.java
@@ -106,7 +106,8 @@ public class ComplexMergeTest {
public static Iterable<Object[]> data() {
Collection<List<Predicate<? super Diff>>> rightConflictPermutations = permutations(
Arrays.<Predicate<? super Diff>> asList(added("Root.Node0"), //$NON-NLS-1$
- moved("Root.Node1", "containmentRef1"), moved("Root.Node6", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ moved("Root.Node1", "containmentRef1"), //$NON-NLS-1$ //$NON-NLS-2$
+ moved("Root.Node6", //$NON-NLS-1$
"containmentRef1"), //$NON-NLS-1$
added("Root.Node9"))); //$NON-NLS-1$
Collection<List<Predicate<? super Diff>>> leftConflictPermutations = permutations(
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java
index 997863400..691fa7be0 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/AudioVisualItemItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -32,39 +31,29 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.AudioVisualItem} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class AudioVisualItemItemProvider
- extends CirculatingItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class AudioVisualItemItemProvider extends CirculatingItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public AudioVisualItemItemProvider(AdapterFactory adapterFactory)
- {
+ public AudioVisualItemItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -75,122 +64,94 @@ public class AudioVisualItemItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Title feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addTitlePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AudioVisualItem_title_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_title_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__TITLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addTitlePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_AudioVisualItem_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_title_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_AudioVisualItem_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__TITLE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Minutes Length feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Minutes Length feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected void addMinutesLengthPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AudioVisualItem_minutesLength_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_minutesLength_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__MINUTES_LENGTH,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ protected void addMinutesLengthPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_AudioVisualItem_minutesLength_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_minutesLength_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_AudioVisualItem_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__MINUTES_LENGTH, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Damaged feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Damaged feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addDamagedPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AudioVisualItem_damaged_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_damaged_feature", "_UI_AudioVisualItem_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__DAMAGED,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
+ protected void addDamagedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_AudioVisualItem_damaged_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AudioVisualItem_damaged_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_AudioVisualItem_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.AUDIO_VISUAL_ITEM__DAMAGED, true, false, false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((AudioVisualItem)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_AudioVisualItem_type") : //$NON-NLS-1$
- getString("_UI_AudioVisualItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_AudioVisualItem_type") : //$NON-NLS-1$
+ getString("_UI_AudioVisualItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(AudioVisualItem.class)) {
case EXTLibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
case EXTLibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
case EXTLibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java
index 0d793b743..e50c12f32 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -31,40 +30,30 @@ import org.eclipse.emf.examples.extlibrary.Book;
import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Book} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Book} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class BookItemProvider
- extends CirculatingItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class BookItemProvider extends CirculatingItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public BookItemProvider(AdapterFactory adapterFactory)
- {
+ public BookItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -76,157 +65,113 @@ public class BookItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Title feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addTitlePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Book_title_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK__TITLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addTitlePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Book_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_title_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__TITLE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Pages feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Pages feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addPagesPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Book_pages_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK__PAGES,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ protected void addPagesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Book_pages_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_pages_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__PAGES, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Category feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Category feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addCategoryPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Book_category_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK__CATEGORY,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addCategoryPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Book_category_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_category_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__CATEGORY, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Author feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Author feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addAuthorPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Book_author_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK__AUTHOR,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addAuthorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Book_author_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_author_feature", "_UI_Book_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.BOOK__AUTHOR, true, false, false, null, null, null));
}
- /**
- * This returns Book.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Book.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Book")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Book)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_Book_type") : //$NON-NLS-1$
- getString("_UI_Book_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Book_type") : //$NON-NLS-1$
+ getString("_UI_Book_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Book.class)) {
case EXTLibraryPackage.BOOK__TITLE:
case EXTLibraryPackage.BOOK__PAGES:
case EXTLibraryPackage.BOOK__CATEGORY:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java
index 710725d87..d3ec52582 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BookOnTapeItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -29,40 +28,30 @@ import org.eclipse.emf.examples.extlibrary.BookOnTape;
import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class BookOnTapeItemProvider
- extends AudioVisualItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class BookOnTapeItemProvider extends AudioVisualItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public BookOnTapeItemProvider(AdapterFactory adapterFactory)
- {
+ public BookOnTapeItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -72,103 +61,77 @@ public class BookOnTapeItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Reader feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Reader feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addReaderPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_BookOnTape_reader_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_reader_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK_ON_TAPE__READER,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addReaderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_BookOnTape_reader_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_reader_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_BookOnTape_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.BOOK_ON_TAPE__READER, true, false, false, null, null, null));
}
- /**
- * This adds a property descriptor for the Author feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Author feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addAuthorPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_BookOnTape_author_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_author_feature", "_UI_BookOnTape_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BOOK_ON_TAPE__AUTHOR,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addAuthorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_BookOnTape_author_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_BookOnTape_author_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_BookOnTape_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.BOOK_ON_TAPE__AUTHOR, true, false, false, null, null, null));
}
- /**
- * This returns BookOnTape.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns BookOnTape.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/BookOnTape")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((BookOnTape)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_BookOnTape_type") : //$NON-NLS-1$
- getString("_UI_BookOnTape_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_BookOnTape_type") : //$NON-NLS-1$
+ getString("_UI_BookOnTape_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java
index 6ad9f7bfe..4a3dee014 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/BorrowerItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -29,40 +28,30 @@ import org.eclipse.emf.examples.extlibrary.Borrower;
import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class BorrowerItemProvider
- extends PersonItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class BorrowerItemProvider extends PersonItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public BorrowerItemProvider(AdapterFactory adapterFactory)
- {
+ public BorrowerItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -71,80 +60,63 @@ public class BorrowerItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Borrowed feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Borrowed feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addBorrowedPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Borrower_borrowed_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Borrower_borrowed_feature", "_UI_Borrower_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.BORROWER__BORROWED,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addBorrowedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Borrower_borrowed_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Borrower_borrowed_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Borrower_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.BORROWER__BORROWED, true, false, false, null, null, null));
}
- /**
- * This returns Borrower.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Borrower.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Borrower")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Borrower)object).getLastName();
- return label == null || label.length() == 0 ?
- getString("_UI_Borrower_type") : //$NON-NLS-1$
- getString("_UI_Borrower_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Borrower_type") : //$NON-NLS-1$
+ getString("_UI_Borrower_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java
index 8ce5617c0..da7da5b15 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/CirculatingItemItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -33,39 +32,29 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.CirculatingItem} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class CirculatingItemItemProvider
- extends ItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class CirculatingItemItemProvider extends ItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public CirculatingItemItemProvider(AdapterFactory adapterFactory)
- {
+ public CirculatingItemItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -75,110 +64,87 @@ public class CirculatingItemItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Copies feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Copies feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addCopiesPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Lendable_copies_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Lendable_copies_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.LENDABLE__COPIES,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ protected void addCopiesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Lendable_copies_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Lendable_copies_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Lendable_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.LENDABLE__COPIES, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Borrowers feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Borrowers feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- protected void addBorrowersPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Lendable_borrowers_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Lendable_borrowers_feature", "_UI_Lendable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.LENDABLE__BORROWERS,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addBorrowersPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Lendable_borrowers_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Lendable_borrowers_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Lendable_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.LENDABLE__BORROWERS, true, false, false, null, null, null));
}
- /**
- * This returns CirculatingItem.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns CirculatingItem.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/CirculatingItem")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
Date labelValue = ((CirculatingItem)object).getPublicationDate();
String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ?
- getString("_UI_CirculatingItem_type") : //$NON-NLS-1$
- getString("_UI_CirculatingItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_CirculatingItem_type") : //$NON-NLS-1$
+ getString("_UI_CirculatingItem_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(CirculatingItem.class)) {
case EXTLibraryPackage.CIRCULATING_ITEM__COPIES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java
index 5391de37b..57288571b 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryEditPlugin.java
@@ -15,89 +15,73 @@ import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
- * This is the central singleton for the EXTLibrary edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the central singleton for the EXTLibrary edit plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public final class EXTLibraryEditPlugin extends EMFPlugin
-{
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public final class EXTLibraryEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public static final EXTLibraryEditPlugin INSTANCE = new EXTLibraryEditPlugin();
+ public static final EXTLibraryEditPlugin INSTANCE = new EXTLibraryEditPlugin();
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- private static Implementation plugin;
+ private static Implementation plugin;
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public EXTLibraryEditPlugin()
- {
- super
- (new ResourceLocator [] {
- });
+ public EXTLibraryEditPlugin() {
+ super(new ResourceLocator[] {});
}
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the singleton instance.
* @generated
*/
- @Override
- public ResourceLocator getPluginResourceLocator()
- {
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
return plugin;
}
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the singleton instance.
* @generated
*/
- public static Implementation getPlugin()
- {
+ public static Implementation getPlugin() {
return plugin;
}
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public static class Implementation extends EclipsePlugin
- {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public Implementation()
- {
+ public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
- }
+ }
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java
index 1a4b5a55a..401fb42fe 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EXTLibraryItemProviderAdapterFactory.java
@@ -32,48 +32,44 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.examples.extlibrary.util.EXTLibraryAdapterFactory;
/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters
+ * generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged
+ * fireNotifyChanged}. The adapters also support Eclipse property sheets. Note that most of the adapters are
+ * shared among multiple instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
-{
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected ComposedAdapterFactory parentAdapterFactory;
+ protected ComposedAdapterFactory parentAdapterFactory;
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public EXTLibraryItemProviderAdapterFactory()
- {
+ public EXTLibraryItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
@@ -81,23 +77,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
supportedTypes.add(IItemPropertySource.class);
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Book} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Book}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected BookItemProvider bookItemProvider;
+ protected BookItemProvider bookItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Book}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Book}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createBookAdapter()
- {
+ @Override
+ public Adapter createBookAdapter() {
if (bookItemProvider == null) {
bookItemProvider = new BookItemProvider(this);
}
@@ -105,23 +100,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return bookItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Library} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Library}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected LibraryItemProvider libraryItemProvider;
+ protected LibraryItemProvider libraryItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Library}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Library}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createLibraryAdapter()
- {
+ @Override
+ public Adapter createLibraryAdapter() {
if (libraryItemProvider == null) {
libraryItemProvider = new LibraryItemProvider(this);
}
@@ -129,23 +123,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return libraryItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Writer} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Writer}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected WriterItemProvider writerItemProvider;
+ protected WriterItemProvider writerItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createWriterAdapter()
- {
+ @Override
+ public Adapter createWriterAdapter() {
if (writerItemProvider == null) {
writerItemProvider = new WriterItemProvider(this);
}
@@ -153,23 +146,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return writerItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.BookOnTape} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.BookOnTape}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected BookOnTapeItemProvider bookOnTapeItemProvider;
+ protected BookOnTapeItemProvider bookOnTapeItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.BookOnTape}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createBookOnTapeAdapter()
- {
+ @Override
+ public Adapter createBookOnTapeAdapter() {
if (bookOnTapeItemProvider == null) {
bookOnTapeItemProvider = new BookOnTapeItemProvider(this);
}
@@ -177,23 +169,23 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return bookOnTapeItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.VideoCassette} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.emf.examples.extlibrary.VideoCassette} instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected VideoCassetteItemProvider videoCassetteItemProvider;
+ protected VideoCassetteItemProvider videoCassetteItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.VideoCassette}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.VideoCassette}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createVideoCassetteAdapter()
- {
+ @Override
+ public Adapter createVideoCassetteAdapter() {
if (videoCassetteItemProvider == null) {
videoCassetteItemProvider = new VideoCassetteItemProvider(this);
}
@@ -201,23 +193,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return videoCassetteItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Borrower} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Borrower}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected BorrowerItemProvider borrowerItemProvider;
+ protected BorrowerItemProvider borrowerItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Borrower}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createBorrowerAdapter()
- {
+ @Override
+ public Adapter createBorrowerAdapter() {
if (borrowerItemProvider == null) {
borrowerItemProvider = new BorrowerItemProvider(this);
}
@@ -225,23 +216,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return borrowerItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Person} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Person}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected PersonItemProvider personItemProvider;
+ protected PersonItemProvider personItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Person}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Person}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createPersonAdapter()
- {
+ @Override
+ public Adapter createPersonAdapter() {
if (personItemProvider == null) {
personItemProvider = new PersonItemProvider(this);
}
@@ -249,23 +239,22 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return personItemProvider;
}
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Employee} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.emf.examples.extlibrary.Employee}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected EmployeeItemProvider employeeItemProvider;
+ protected EmployeeItemProvider employeeItemProvider;
- /**
- * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter createEmployeeAdapter()
- {
+ @Override
+ public Adapter createEmployeeAdapter() {
if (employeeItemProvider == null) {
employeeItemProvider = new EmployeeItemProvider(this);
}
@@ -273,59 +262,54 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return employeeItemProvider;
}
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- public ComposeableAdapterFactory getRootAdapterFactory()
- {
+ public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
- {
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public boolean isFactoryForType(Object type)
- {
+ @Override
+ public boolean isFactoryForType(Object type) {
return supportedTypes.contains(type) || super.isFactoryForType(type);
}
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Adapter adapt(Notifier notifier, Object type)
- {
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
return super.adapt(notifier, this);
}
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object adapt(Object object, Object type)
- {
+ @Override
+ public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
@@ -336,36 +320,31 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
return null;
}
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public void addListener(INotifyChangedListener notifyChangedListener)
- {
+ public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- public void removeListener(INotifyChangedListener notifyChangedListener)
- {
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
- public void fireNotifyChanged(Notification notification)
- {
+ public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
if (parentAdapterFactory != null) {
@@ -373,22 +352,29 @@ public class EXTLibraryItemProviderAdapterFactory extends EXTLibraryAdapterFacto
}
}
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- public void dispose()
- {
- if (bookItemProvider != null) bookItemProvider.dispose();
- if (libraryItemProvider != null) libraryItemProvider.dispose();
- if (writerItemProvider != null) writerItemProvider.dispose();
- if (bookOnTapeItemProvider != null) bookOnTapeItemProvider.dispose();
- if (videoCassetteItemProvider != null) videoCassetteItemProvider.dispose();
- if (borrowerItemProvider != null) borrowerItemProvider.dispose();
- if (personItemProvider != null) personItemProvider.dispose();
- if (employeeItemProvider != null) employeeItemProvider.dispose();
+ public void dispose() {
+ if (bookItemProvider != null)
+ bookItemProvider.dispose();
+ if (libraryItemProvider != null)
+ libraryItemProvider.dispose();
+ if (writerItemProvider != null)
+ writerItemProvider.dispose();
+ if (bookOnTapeItemProvider != null)
+ bookOnTapeItemProvider.dispose();
+ if (videoCassetteItemProvider != null)
+ videoCassetteItemProvider.dispose();
+ if (borrowerItemProvider != null)
+ borrowerItemProvider.dispose();
+ if (personItemProvider != null)
+ personItemProvider.dispose();
+ if (employeeItemProvider != null)
+ employeeItemProvider.dispose();
}
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java
index 0fc3fe873..47b368925 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/EmployeeItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -29,40 +28,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Employee;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Employee} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class EmployeeItemProvider
- extends PersonItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class EmployeeItemProvider extends PersonItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public EmployeeItemProvider(AdapterFactory adapterFactory)
- {
+ public EmployeeItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -71,80 +60,63 @@ public class EmployeeItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Manager feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Manager feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addManagerPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Employee_manager_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Employee_manager_feature", "_UI_Employee_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.EMPLOYEE__MANAGER,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addManagerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Employee_manager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Employee_manager_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Employee_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.EMPLOYEE__MANAGER, true, false, false, null, null, null));
}
- /**
- * This returns Employee.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Employee.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Employee)object).getLastName();
- return label == null || label.length() == 0 ?
- getString("_UI_Employee_type") : //$NON-NLS-1$
- getString("_UI_Employee_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Employee_type") : //$NON-NLS-1$
+ getString("_UI_Employee_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java
index a342fd2e8..855770fc2 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/ItemItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -35,40 +34,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Item;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Item} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Item} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class ItemItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class ItemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public ItemItemProvider(AdapterFactory adapterFactory)
- {
+ public ItemItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -77,87 +66,74 @@ public class ItemItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Publication Date feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Publication Date feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected void addPublicationDatePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Item_publicationDate_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Item_publicationDate_feature", "_UI_Item_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.ITEM__PUBLICATION_DATE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addPublicationDatePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Item_publicationDate_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Item_publicationDate_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Item_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.ITEM__PUBLICATION_DATE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
Date labelValue = ((Item)object).getPublicationDate();
String label = labelValue == null ? null : labelValue.toString();
- return label == null || label.length() == 0 ?
- getString("_UI_Item_type") : //$NON-NLS-1$
- getString("_UI_Item_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Item_type") : //$NON-NLS-1$
+ getString("_UI_Item_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Item.class)) {
case EXTLibraryPackage.ITEM__PUBLICATION_DATE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- @Override
- public ResourceLocator getResourceLocator()
- {
+ @Override
+ public ResourceLocator getResourceLocator() {
return EXTLibraryEditPlugin.INSTANCE;
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java
index 2556ab310..fedb4374f 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/LibraryItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -37,40 +36,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Library;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Library} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Library} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class LibraryItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class LibraryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public LibraryItemProvider(AdapterFactory adapterFactory)
- {
+ public LibraryItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -81,86 +70,60 @@ public class LibraryItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Address feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Address feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addAddressPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addAddressPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Addressable_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Library_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.LIBRARY__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Library_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Library_name_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Library_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.LIBRARY__NAME, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Books feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Books feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addBooksPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Library_books_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Library_books_feature", "_UI_Library_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.LIBRARY__BOOKS,
- false,
- false,
- false,
- null,
- null,
- null));
+ protected void addBooksPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Library_books_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Library_books_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Library_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.LIBRARY__BOOKS, false, false, false, null, null, null));
}
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for
+ * an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand}
+ * or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
- {
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(EXTLibraryPackage.Literals.LIBRARY__WRITERS);
@@ -172,132 +135,110 @@ public class LibraryItemProvider
return childrenFeatures;
}
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child)
- {
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
- /**
- * This returns Library.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Library.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Library")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Library)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Library_type") : //$NON-NLS-1$
- getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Library_type") : //$NON-NLS-1$
+ getString("_UI_Library_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Library.class)) {
case EXTLibraryPackage.LIBRARY__ADDRESS:
case EXTLibraryPackage.LIBRARY__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case EXTLibraryPackage.LIBRARY__WRITERS:
case EXTLibraryPackage.LIBRARY__EMPLOYEES:
case EXTLibraryPackage.LIBRARY__BORROWERS:
case EXTLibraryPackage.LIBRARY__STOCK:
case EXTLibraryPackage.LIBRARY__BRANCHES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__WRITERS,
- EXTLibraryFactory.eINSTANCE.createWriter()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__WRITERS,
+ EXTLibraryFactory.eINSTANCE.createWriter()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES,
- EXTLibraryFactory.eINSTANCE.createEmployee()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__EMPLOYEES,
+ EXTLibraryFactory.eINSTANCE.createEmployee()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__BORROWERS,
- EXTLibraryFactory.eINSTANCE.createBorrower()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__BORROWERS,
+ EXTLibraryFactory.eINSTANCE.createBorrower()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__STOCK,
- EXTLibraryFactory.eINSTANCE.createBook()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createBook()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__STOCK,
- EXTLibraryFactory.eINSTANCE.createBookOnTape()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createBookOnTape()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__STOCK,
- EXTLibraryFactory.eINSTANCE.createVideoCassette()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__STOCK,
+ EXTLibraryFactory.eINSTANCE.createVideoCassette()));
- newChildDescriptors.add
- (createChildParameter
- (EXTLibraryPackage.Literals.LIBRARY__BRANCHES,
- EXTLibraryFactory.eINSTANCE.createLibrary()));
+ newChildDescriptors.add(createChildParameter(EXTLibraryPackage.Literals.LIBRARY__BRANCHES,
+ EXTLibraryFactory.eINSTANCE.createLibrary()));
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- @Override
- public ResourceLocator getResourceLocator()
- {
+ @Override
+ public ResourceLocator getResourceLocator() {
return EXTLibraryEditPlugin.INSTANCE;
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java
index 0a5a5620c..b26b1ac5b 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PeriodicalItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -31,40 +30,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Periodical;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Periodical} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Periodical} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class PeriodicalItemProvider
- extends ItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class PeriodicalItemProvider extends ItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public PeriodicalItemProvider(AdapterFactory adapterFactory)
- {
+ public PeriodicalItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -74,98 +63,78 @@ public class PeriodicalItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Title feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addTitlePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Periodical_title_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Periodical_title_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.PERIODICAL__TITLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addTitlePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Periodical_title_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Periodical_title_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Periodical_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.PERIODICAL__TITLE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Issues Per Year feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Issues Per Year feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected void addIssuesPerYearPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Periodical_issuesPerYear_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Periodical_issuesPerYear_feature", "_UI_Periodical_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.PERIODICAL__ISSUES_PER_YEAR,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ protected void addIssuesPerYearPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Periodical_issuesPerYear_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Periodical_issuesPerYear_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Periodical_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.PERIODICAL__ISSUES_PER_YEAR, true, false, false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Periodical)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_Periodical_type") : //$NON-NLS-1$
- getString("_UI_Periodical_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Periodical_type") : //$NON-NLS-1$
+ getString("_UI_Periodical_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Periodical.class)) {
case EXTLibraryPackage.PERIODICAL__TITLE:
case EXTLibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java
index c3548d7a0..48a1ea59c 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/PersonItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -34,40 +33,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Person;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Person} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Person} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class PersonItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class PersonItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public PersonItemProvider(AdapterFactory adapterFactory)
- {
+ public PersonItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -78,146 +67,116 @@ public class PersonItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Address feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Address feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addAddressPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", "_UI_Addressable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addAddressPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Addressable_address_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Addressable_address_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Addressable_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.ADDRESSABLE__ADDRESS, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the First Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the First Name feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- protected void addFirstNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Person_firstName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.PERSON__FIRST_NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addFirstNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Person_firstName_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Person_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.PERSON__FIRST_NAME, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Last Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Last Name feature. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- protected void addLastNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Person_lastName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", "_UI_Person_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.PERSON__LAST_NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addLastNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Person_lastName_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Person_lastName_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Person_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.PERSON__LAST_NAME, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This returns Person.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Person.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Person")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Person)object).getLastName();
- return label == null || label.length() == 0 ?
- getString("_UI_Person_type") : //$NON-NLS-1$
- getString("_UI_Person_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Person_type") : //$NON-NLS-1$
+ getString("_UI_Person_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Person.class)) {
case EXTLibraryPackage.PERSON__ADDRESS:
case EXTLibraryPackage.PERSON__FIRST_NAME:
case EXTLibraryPackage.PERSON__LAST_NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- @Override
- public ResourceLocator getResourceLocator()
- {
+ @Override
+ public ResourceLocator getResourceLocator() {
return EXTLibraryEditPlugin.INSTANCE;
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java
index 6348fba36..52e251115 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/VideoCassetteItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -30,39 +29,29 @@ import org.eclipse.emf.examples.extlibrary.VideoCassette;
/**
* This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.VideoCassette} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class VideoCassetteItemProvider
- extends AudioVisualItemItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class VideoCassetteItemProvider extends AudioVisualItemItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public VideoCassetteItemProvider(AdapterFactory adapterFactory)
- {
+ public VideoCassetteItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -71,80 +60,63 @@ public class VideoCassetteItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Cast feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Cast feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addCastPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_VideoCassette_cast_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_VideoCassette_cast_feature", "_UI_VideoCassette_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.VIDEO_CASSETTE__CAST,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addCastPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_VideoCassette_cast_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_VideoCassette_cast_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_VideoCassette_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.VIDEO_CASSETTE__CAST, true, false, false, null, null, null));
}
- /**
- * This returns VideoCassette.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns VideoCassette.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/VideoCassette")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((VideoCassette)object).getTitle();
- return label == null || label.length() == 0 ?
- getString("_UI_VideoCassette_type") : //$NON-NLS-1$
- getString("_UI_VideoCassette_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_VideoCassette_type") : //$NON-NLS-1$
+ getString("_UI_VideoCassette_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
diff --git a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java
index a679bb091..1ab04da8f 100644
--- a/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java
+++ b/tutorial/org.eclipse.emf.examples.library.edit/src/org/eclipse/emf/examples/extlibrary/provider/WriterItemProvider.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.examples.extlibrary.provider;
-
import java.util.Collection;
import java.util.List;
@@ -31,40 +30,30 @@ import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
import org.eclipse.emf.examples.extlibrary.Writer;
/**
- * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the item provider adapter for a {@link org.eclipse.emf.examples.extlibrary.Writer} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class WriterItemProvider
- extends PersonItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+public class WriterItemProvider extends PersonItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- public WriterItemProvider(AdapterFactory adapterFactory)
- {
+ public WriterItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
@@ -74,109 +63,84 @@ public class WriterItemProvider
return itemPropertyDescriptors;
}
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Writer_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.WRITER__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Writer_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Writer_name_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EXTLibraryPackage.Literals.WRITER__NAME, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
- /**
- * This adds a property descriptor for the Books feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds a property descriptor for the Books feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addBooksPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Writer_books_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", "_UI_Writer_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EXTLibraryPackage.Literals.WRITER__BOOKS,
- true,
- false,
- false,
- null,
- null,
- null));
+ protected void addBooksPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Writer_books_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Writer_books_feature", //$NON-NLS-1$ //$NON-NLS-2$
+ "_UI_Writer_type"), //$NON-NLS-1$
+ EXTLibraryPackage.Literals.WRITER__BOOKS, true, false, false, null, null, null));
}
- /**
- * This returns Writer.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns Writer.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public Object getImage(Object object)
- {
+ @Override
+ public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Writer")); //$NON-NLS-1$
}
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public String getText(Object object)
- {
+ @Override
+ public String getText(Object object) {
String label = ((Writer)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Writer_type") : //$NON-NLS-1$
- getString("_UI_Writer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return label == null || label.length() == 0 ? getString("_UI_Writer_type") : //$NON-NLS-1$
+ getString("_UI_Writer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached children and
+ * by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- public void notifyChanged(Notification notification)
- {
+ @Override
+ public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Writer.class)) {
case EXTLibraryPackage.WRITER__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ fireNotifyChanged(
+ new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be
+ * created under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}

Back to the top