diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/ToolingBaseUIActivator.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/ToolingBaseUIActivator.java index 89d506ce69f6a3106ab5a8a5d62a099e09c9493b..99ad548f50f1c6179a7f0a864ad472bc3b2cdf92 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/ToolingBaseUIActivator.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/ToolingBaseUIActivator.java @@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 1D717C45E4E5E6DB57569062F7E741A1 + * @ConQAT.Rating YELLOW Hash: C2C3F8B958211307EAE1AC2650F921EC */ public class ToolingBaseUIActivator extends AbstractUIPlugin { @@ -37,11 +37,6 @@ public class ToolingBaseUIActivator extends AbstractUIPlugin { /** The shared instance. */ private static ToolingBaseUIActivator plugin; - /** Constructor. */ - public ToolingBaseUIActivator() { - // do nothing - } - /** {@inheritDoc} */ @Override public void start(BundleContext context) throws Exception { diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBaseActivator.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBaseActivator.java index af05f0673a3f2eae0a21c9d742eb32460920fb2a..7b6defbf0309a8bb4727f06d14400f84c7b7236e 100644 --- a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBaseActivator.java +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/ToolingBaseActivator.java @@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: D6B33EFB704B0CA151E1C945B5BC48C6 + * @ConQAT.Rating YELLOW Hash: 5C875862B62D7463965C14A53088735B */ public class ToolingBaseActivator extends Plugin { @@ -36,11 +36,6 @@ public class ToolingBaseActivator extends Plugin { /** The shared instance. */ private static ToolingBaseActivator plugin; - /** Constructor. */ - public ToolingBaseActivator() { - // do nothing - } - /** {@inheritDoc} */ @Override public void start(BundleContext context) throws Exception { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/ToolingKernelUIActivator.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/ToolingKernelUIActivator.java index 0e7c0b7456b80248e37a29e69fb0a2fe5e24f0a7..fe25e4a2fd6a7525e124849dcbee6a4351437f27 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/ToolingKernelUIActivator.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/ToolingKernelUIActivator.java @@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 1D717C45E4E5E6DB57569062F7E741A1 + * @ConQAT.Rating YELLOW Hash: 1BDD065B5C8C0E977D45B5BB2D6AD704 */ public class ToolingKernelUIActivator extends AbstractUIPlugin { @@ -37,11 +37,6 @@ public class ToolingKernelUIActivator extends AbstractUIPlugin { /** The shared instance. */ private static ToolingKernelUIActivator plugin; - /** Constructor. */ - public ToolingKernelUIActivator() { - // do nothing - } - /** {@inheritDoc} */ @Override public void start(BundleContext context) throws Exception { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/EditorBase.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/EditorBase.java index c92d15a664c83d4537e2b709c6ecfd0104c1d4d2..333c3993a882f3e1668e86def85e25ab177e10e4 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/EditorBase.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/EditorBase.java @@ -38,7 +38,7 @@ import org.fortiss.tooling.kernel.ui.internal.editor.ModelElementEditorInput; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: FAA96049E4259A80E6F68B3CB804C2DB + * @ConQAT.Rating YELLOW Hash: 468A589E32DF24EEF966B06649887E03 */ public abstract class EditorBase<T extends EObject> extends EditorPart implements IActionContributingEditor { @@ -125,7 +125,7 @@ public abstract class EditorBase<T extends EObject> extends EditorPart /** {@inheritDoc} */ @Override public final void doSaveAs() { - // Saving is handled automatically by emfStore + // Saving is handled automatically by persistency service } /** {@inheritDoc} */ diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/ModelElementHandlerBase.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/ModelElementHandlerBase.java index d7c1dfbbb2e387540057cb35011b93eb6ffbd20e..99f8df5ee41e4d6acba8a6d1a265831d4bac30e1 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/ModelElementHandlerBase.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/ModelElementHandlerBase.java @@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.ui.interfaces.IModelElementHandler; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: D35DD317B0C9AB5C153A5FEB5BC870EE + * @ConQAT.Rating YELLOW Hash: 917041660DD89A42589D65ED4EDF5CF2 */ public abstract class ModelElementHandlerBase<T extends EObject> implements IModelElementHandler<T> { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/NamedCommentedModelElementHandlerBase.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/NamedCommentedModelElementHandlerBase.java index 5f2e112aa17bcff8686a0aac39a3882dec6f7e5b..05bc93716cfffd4d1af049dfa86a0c2ea9e5dfd3 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/NamedCommentedModelElementHandlerBase.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/base/NamedCommentedModelElementHandlerBase.java @@ -27,7 +27,7 @@ import org.fortiss.tooling.kernel.ui.interfaces.IModelElementHandler; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 4322A4966A33DE648942D7D50E923FCF + * @ConQAT.Rating YELLOW Hash: 55120D889569756A57306BB1E5624DA8 */ public abstract class NamedCommentedModelElementHandlerBase<T extends INamedCommentedElement> extends ModelElementHandlerBase<T> { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/EObjectObservableValue.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/EObjectObservableValue.java index 026942f430d469ddb54a0823f6786224f95615e7..6906a3d786d96896cd89dbc1493a7aadf6e9a930 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/EObjectObservableValue.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/EObjectObservableValue.java @@ -38,7 +38,7 @@ import org.fortiss.tooling.kernel.services.ICommandStackService; * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: 15CFC8E0F8C76EB39F1E306637EC6436 + * @ConQAT.Rating YELLOW Hash: FF1D7244CAF1F42A0CDCD95FA05EF519 */ public class EObjectObservableValue extends AbstractObservableValue { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/Observables.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/Observables.java index 80c2da76bd4bad9d5032e323c08e95d442ff543a..230bae2590b82606ce1d104722be808e06c5d5b9 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/Observables.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/databinding/Observables.java @@ -24,12 +24,12 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; /** - * Observerables for EObject models. + * Observerables for {@link EObject} models. * * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: D2469271EB80E5AA630EB34902E89A52 + * @ConQAT.Rating YELLOW Hash: 1F057C79CD5F9FFAC36A9B899B5D5FA6 */ public class Observables { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IActionContributingEditor.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IActionContributingEditor.java index 7bca16aaeea5bdba23b79a8ff45d885bf0f35481..719b306fc9237bd81e51de90ac17dd4e53ed7840 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IActionContributingEditor.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IActionContributingEditor.java @@ -27,7 +27,7 @@ import org.fortiss.tooling.kernel.ui.internal.editor.BindingContributor; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: + * @ConQAT.Rating YELLOW Hash: F21F807F121EFD17352A1BBDEA5609B8 */ public interface IActionContributingEditor { /** diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IBindingEditorPageChangeListener.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IBindingEditorPageChangeListener.java index 2d826a9e70dd4c3350e827fba9f7988145467712..41062a93877580d3c15a5e12efb5ca0363bd8245 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IBindingEditorPageChangeListener.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IBindingEditorPageChangeListener.java @@ -25,7 +25,7 @@ import org.fortiss.tooling.kernel.ui.internal.editor.BindingEditor; * @author hoelzl * @author $Author: hoelzl $ * @version $Rev: 18709 $ - * @ConQAT.Rating YELLOW Hash: 6A3E42B1BE8519EA4B528FBF2E8D3F0A + * @ConQAT.Rating YELLOW Hash: 31B6B4FCCD19160ADF8A9ACBD31B3E9B */ public interface IBindingEditorPageChangeListener { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/ICustomMenuContributor.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/ICustomMenuContributor.java index dd3a077460475f44be14ef75df09ee9aed3b9437..873d480d9232931855929f10744cc59aa2062e6a 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/ICustomMenuContributor.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/ICustomMenuContributor.java @@ -29,7 +29,7 @@ import org.fortiss.tooling.kernel.ui.services.IContextMenuService; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: 2EACD5609822D5747074DB89E6956349 + * @ConQAT.Rating YELLOW Hash: 08A60D2BBA490E7EBB63F2F6B02983C9 */ public interface ICustomMenuContributor { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditPartFactory.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditPartFactory.java index fa16040fdd8db158948dceb3f2cf10e7edffe746..29d67e88ec0d68cc3715ca547e9f10ad0dc562bc 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditPartFactory.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditPartFactory.java @@ -28,9 +28,9 @@ import org.fortiss.tooling.kernel.interfaces.IEObjectAware; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: + * @ConQAT.Rating YELLOW Hash: FCE65AE37C2C903EEDB13E0B39F3B55D */ public interface IEditPartFactory<T extends EObject> extends IEObjectAware<T>, EditPartFactory { - // no special content, inheritance only + // no special content, inheritance of IEObjectAware and EditPartFactory only } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditorBinding.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditorBinding.java index 0660e2ecb64a1833beb3a164be3b2053a7a053bf..c6d6699c5d22d4555ffe6ee9cd430b5b52004b2a 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditorBinding.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IEditorBinding.java @@ -27,7 +27,7 @@ import org.fortiss.tooling.kernel.interfaces.IEObjectAware; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 4AC49B113174D91D434A480C3456423F + * @ConQAT.Rating YELLOW Hash: 7E389CB6937BF93467517F49FEC75BCA */ public interface IEditorBinding<T extends EObject> extends IEObjectAware<EObject> { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IModelElementHandler.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IModelElementHandler.java index 296376a72e76789eace9cdc8b448edd0a5432cb4..7ca478ad73046dd48864e02b080b6f4a35ddd8d4 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IModelElementHandler.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/interfaces/IModelElementHandler.java @@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.interfaces.IEObjectAware; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 7961ACC39EA9897DE867D119EE5DAFE2 + * @ConQAT.Rating YELLOW Hash: 02238EA9A8F42D8C9C21B463606C8A2D */ public interface IModelElementHandler<T extends EObject> extends IEObjectAware<T> { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/EditPartFactoryService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/EditPartFactoryService.java index 0dfd8b8b74e18403c9e8a116f99c5b4d6a4bd2a6..88f5ac52c3871b012d27d89151f792161472ad5e 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/EditPartFactoryService.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/EditPartFactoryService.java @@ -34,7 +34,7 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 31E49A6AD1B4A03E4CFEC3BB584284B5 + * @ConQAT.Rating YELLOW Hash: F3AF21797C779669598761DD4854D145 */ public class EditPartFactoryService extends EObjectAwareServiceBase<IEditPartFactory<EObject>> implements diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java index b93e8d4a9e9e6f45350b7a7deacb04237446c53e..00d45546cf08ec82bd16ef2450636d3c82442e1a 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java @@ -28,5 +28,5 @@ import org.fortiss.tooling.kernel.ui.services.IMarkerService; * @ConQAT.Rating RED Hash: 48FCF6B19C8D07FBEAD8EC8AD2BAA5EF */ public class MarkerService implements IMarkerService { - + // TODO (FH) implement } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/BindingContributor.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/BindingContributor.java index effb2e0b33521f1d996b5408d824801adb95a217..643933338debf2371410bec8936dc4c8566c0a25 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/BindingContributor.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/BindingContributor.java @@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.ui.services.IActionService; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: + * @ConQAT.Rating YELLOW Hash: C7051BC810281AFB5BA9B19154724151 */ public final class BindingContributor extends MultiPageEditorActionBarContributor { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/ModelElementEditorInput.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/ModelElementEditorInput.java index 81c8f8846c97604feb628319d322156fcbf5a828..3d2fe1f97d2183b433ccf8b08ff92803d76cfc42 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/ModelElementEditorInput.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/editor/ModelElementEditorInput.java @@ -30,7 +30,7 @@ import org.fortiss.tooling.kernel.ui.services.IModelElementService; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 263039D4B69848F372B6ED729970B629 + * @ConQAT.Rating YELLOW Hash: 97D91D2A7C2890305CC4A990F1A5FBC1 */ public final class ModelElementEditorInput implements IEditorInput { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java index a077c79e465aeaac1f4085d1d29c90514236badf..c81631d28fe3e70cbf9ba2bb288fca7a361db821 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/IdLabeledPropertySection.java @@ -34,7 +34,7 @@ import org.fortiss.tooling.kernel.ui.databinding.Observables; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: EE2461D408E5DF9E78A690CB2EA9612E + * @ConQAT.Rating YELLOW Hash: AAF40E2ED1B53B1E58814F6BB5A710D4 */ public class IdLabeledPropertySection extends PropertySectionBase { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/NamedCommentedPropertySection.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/NamedCommentedPropertySection.java index 9f168198b9c89f8a3dee1b936bd3fd765cb6e2cc..7b96eb9153c19ed1525dc8e7be937589268bb281 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/NamedCommentedPropertySection.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/NamedCommentedPropertySection.java @@ -34,7 +34,7 @@ import org.fortiss.tooling.kernel.ui.databinding.Observables; * @author ratiu * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: D5A013EBF5437A031DDC569E2A7A108F + * @ConQAT.Rating YELLOW Hash: 94D36327BAB4EA717EA2163D820B9194 */ public class NamedCommentedPropertySection extends PropertySectionBase { @@ -52,9 +52,7 @@ public class NamedCommentedPropertySection extends PropertySectionBase { super(); } - /** - * {@inheritDoc} - */ + /** {@inheritDoc} */ @Override public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { @@ -64,9 +62,7 @@ public class NamedCommentedPropertySection extends PropertySectionBase { commentText = createFormText("Comment"); } - /** - * {@inheritDoc} - */ + /** {@inheritDoc} */ @Override protected void setSectionInput(Object input) { namedCommented = (INamedCommentedElement) input; @@ -89,5 +85,4 @@ public class NamedCommentedPropertySection extends PropertySectionBase { dbc.bindValue(SWTObservables.observeText(commentText, SWT.FocusOut), modelObservable, null, null); } - } \ No newline at end of file diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/PropertiesAdapterFactory.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/PropertiesAdapterFactory.java index e511e7fdec119bcccf4afeaa8632ee9dc3d5155c..78bc8c0413058f2e741f12e343465f2e284665c5 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/PropertiesAdapterFactory.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/properties/PropertiesAdapterFactory.java @@ -29,7 +29,7 @@ import org.fortiss.tooling.kernel.ui.services.IPropertiesService; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 7AEC5A301361A2C14067F38D4AC5C7FE + * @ConQAT.Rating YELLOW Hash: 0CB9AF7EAB134DF256A41CEDF2C4FE44 */ @SuppressWarnings("rawtypes") public final class PropertiesAdapterFactory implements IAdapterFactory { @@ -59,5 +59,4 @@ public final class PropertiesAdapterFactory implements IAdapterFactory { public Class[] getAdapterList() { return new Class[] { ITabbedPropertySheetPageContributor.class }; } - } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/EObjectDragSourceListener.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/EObjectDragSourceListener.java index 38bb3293b3629416a1e99477f10cc518304ae756..2f343ebb90da9940683c36677e921633d382bbb0 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/EObjectDragSourceListener.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/EObjectDragSourceListener.java @@ -24,11 +24,12 @@ import org.eclipse.swt.dnd.DragSourceAdapter; import org.eclipse.swt.dnd.DragSourceEvent; /** + * Drag and drop support for {@link LibraryView}. * - * @author Eder + * @author eder * @author $Author: hoelzl $ * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: 249A02E8613055D236661A34D74A461C + * @ConQAT.Rating YELLOW Hash: 7274445CF4D8976F98D2261373206375 */ public class EObjectDragSourceListener extends DragSourceAdapter { @@ -65,5 +66,4 @@ public class EObjectDragSourceListener extends DragSourceAdapter { event.data = ((IStructuredSelection) libraryViewer.getSelection()) .getFirstElement(); } - } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java index a0da50398ba6dac211b67926956be15b76ccfe98..9abb497499afad8a85bf0db900110e9234e3590e 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/LibraryView.java @@ -53,7 +53,7 @@ import org.fortiss.tooling.kernel.ui.services.IModelElementService; * @author eder * @author $Author: hoelzl $ * @version $Rev: 18709 $ - * @ConQAT.Rating RED Hash: A43DAF31B100FF92B123EA6A31C86CBA + * @ConQAT.Rating YELLOW Hash: D385105D51E1CFDED0B8FF4E855A2B94 */ public class LibraryView extends ViewPart { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeContentProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeContentProvider.java index 1f955c28e4397ff2a975cd52cf147f9fc351d01b..68dca8dffc7e57a6826e11f41f1c9e115a17607d 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeContentProvider.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeContentProvider.java @@ -34,7 +34,7 @@ import org.fortiss.tooling.kernel.ui.services.IModelElementService; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: DBA3E3CC4704ECB40F35CF9D36BFE89A + * @ConQAT.Rating YELLOW Hash: B99F9C3252CFF2333B31E7075D035057 */ public class NavigatorTreeContentProvider implements ITreeContentProvider { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeLabelProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeLabelProvider.java index 5ebab775944cbb26d95cb80aa40375a6519443e2..0fbbed6b2e987955572352dec4adc694c212bb5e 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeLabelProvider.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NavigatorTreeLabelProvider.java @@ -30,7 +30,7 @@ import org.fortiss.tooling.kernel.ui.services.IModelElementService; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: E1D373938BE78CBD44141D12444BE654 + * @ConQAT.Rating YELLOW Hash: 576FB18EB32B79705C9E03CB910F68CB */ public final class NavigatorTreeLabelProvider extends BaseLabelProvider implements ILabelProvider { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NewMenu.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NewMenu.java index 0cae44aca1fa61f688e781fc207d6c585a3a5832..44615b738170d6f045650153c4fa374b43f587ef 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NewMenu.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/views/NewMenu.java @@ -124,5 +124,4 @@ public class NewMenu extends CompoundContributionItem { } } - } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java index e2888167288a7f18f099d19958c8b1d163c4c91d..a02ae72f9dc0e638d11fabe8b7befa678171dc7c 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java @@ -32,10 +32,10 @@ import org.eclipse.swt.widgets.Control; /** * Utility methods for data binding support. * - * @author hoelzlf + * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: 95D1650431DCD178D61C00A971F6810C + * @ConQAT.Rating YELLOW Hash: 646DA3B438CB4A6FCF6D7740388C0373 */ public final class DataBindingUtils { diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DragAndDropUtils.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DragAndDropUtils.java index 465ff228ea691e6d5d3327ccb7f70610aab40de1..2678dcc6396ff1c5a2e1870f0a35d451fd7983a4 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DragAndDropUtils.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DragAndDropUtils.java @@ -24,10 +24,10 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype; /** * Utility methods for drag and drop support. * - * @author hoelzlf + * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: 7ABCFF777BE5B8EA5A7F4F65D264072E + * @ConQAT.Rating YELLOW Hash: 338194B154464E27FA65CDCD72CE7439 */ public final class DragAndDropUtils { diff --git a/org.fortiss.tooling.kernel/trunk/plugin.xml b/org.fortiss.tooling.kernel/trunk/plugin.xml index 2bd8648642b9956a627a35b9d27634289d0f0866..9dd64404dc68d29d300b3fd13d3bd2b4d1227f88 100644 --- a/org.fortiss.tooling.kernel/trunk/plugin.xml +++ b/org.fortiss.tooling.kernel/trunk/plugin.xml @@ -6,6 +6,7 @@ <extension-point id="modelElementConnector" name="Model Element Connector" schema="schema/modelElementConnector.exsd"/> <extension-point id="modelStorageProvider" name="Model Storage Provider" schema="schema/modelStorageProvider.exsd"/> <extension-point id="modelConstraintChecker" name="Model Constraint Checker" schema="schema/modelConstraintChecker.exsd"/> + <extension-point id="eclipseResourceStorageLocationProvider" name="Eclipse Resource Storage Location Provider" schema="schema/eclipseResourceStorageLocationProvider.exsd"/> <extension point="org.eclipse.emf.ecore.generated_package"> <package diff --git a/org.fortiss.tooling.kernel/trunk/schema/eclipseResourceStorageLocationProvider.exsd b/org.fortiss.tooling.kernel/trunk/schema/eclipseResourceStorageLocationProvider.exsd new file mode 100644 index 0000000000000000000000000000000000000000..2abbc108867a0a05f32585ab958b1881658b5ea4 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/schema/eclipseResourceStorageLocationProvider.exsd @@ -0,0 +1,102 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.fortiss.tooling.kernel" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appinfo> + <meta.schema plugin="org.fortiss.tooling.kernel" id="eclipseResourceStorageLocationProvider" name="Eclipse Resource Storage Location Provider"/> + </appinfo> + <documentation> + Registers a location provider for Eclipse resource based storage. + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appinfo> + <meta.element /> + </appinfo> + </annotation> + <complexType> + <sequence> + <element ref="storageLocationProvider" minOccurs="1" maxOccurs="unbounded"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute translatable="true"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="storageLocationProvider"> + <complexType> + <attribute name="provider" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute kind="java" basedOn=":org.fortiss.tooling.kernel.interfaces.IEclipseResourceStorageLocationProvider"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appinfo> + <meta.section type="since"/> + </appinfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="examples"/> + </appinfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="apiinfo"/> + </appinfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="implementation"/> + </appinfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java index 865a47f0c5b6d307647c254051c21ff8619b4f92..659629e39884842f5910037349f260a4f4f4c42a 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java @@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 157BFA58493859794739A4C9E55B0EFF + * @ConQAT.Rating YELLOW Hash: DB241126336AD7DDFEF835CC72703F1E */ public class ToolingKernelActivator extends Plugin { @@ -37,11 +37,6 @@ public class ToolingKernelActivator extends Plugin { /** The shared instance. */ private static ToolingKernelActivator plugin; - /** Constructor. */ - public ToolingKernelActivator() { - // do nothing - } - /** {@inheritDoc} */ @Override public void start(BundleContext context) throws Exception { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEclipseResourceStorageLocationProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEclipseResourceStorageLocationProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..80a8d028312aea160e75a332b5f74eeac19c4b59 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IEclipseResourceStorageLocationProvider.java @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 ForTISS GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.kernel.interfaces; + +import org.eclipse.core.resources.IFile; +import org.fortiss.tooling.kernel.internal.storage.eclipse.EclipseResourceStorageProvider; + +/** + * Extension interface for the {@link EclipseResourceStorageProvider} mechanism. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating YELLOW Hash: F2CBF6F78C114C5AE2676C85403E4488 + */ +public interface IEclipseResourceStorageLocationProvider { + + /** + * Returns whether the given {@link IFile} should be considered as a model + * file. + */ + boolean isStorageLocation(IFile file); +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java index 16e336a7941be2783047ff21f02ed3c1cf013c53..35017f48216ab4ab0f8c90bb33bf109e8580f3d7 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java @@ -17,6 +17,7 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; +import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; @@ -25,6 +26,7 @@ import java.util.Map; import org.conqat.lib.commons.collections.CollectionUtils; import org.conqat.lib.commons.collections.UnmodifiableList; +import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.EObject; @@ -38,20 +40,21 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; import org.osgi.framework.Bundle; /** - * This class implements the {@link IPersistencyService} interface. + * This class implements the {@link IPersistencyService} interface. All of its + * public methods are synchronized. * * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 152A73FE81A28D789914ECBD143F1DFF + * @ConQAT.Rating YELLOW Hash: D6F9583647E210E21463E15ECC7E6334 */ public class PersistencyService implements IPersistencyService { /** The prototype provider extension point ID. */ - private static final String EXTENSION_POINT_NAME = "org.fortiss.tooling.kernel.modelPrototypeProvider"; + private static final String EXTENSION_POINT_NAME = "org.fortiss.tooling.kernel.modelStorageProvider"; /** The prototype provider configuration element name. */ - private static final String CONFIGURATION_ELEMENT_NAME = "modelPrototypeProvider"; + private static final String CONFIGURATION_ELEMENT_NAME = "modelStorageProvider"; /** Stores the registered storage providers. */ private final List<IStorageProvider> storageProviderList = new ArrayList<IStorageProvider>(); @@ -68,17 +71,18 @@ public class PersistencyService implements IPersistencyService { /** Constructor. */ public PersistencyService() { setupStorageProviders(); + initializeTopLevelElementContexts(); } /** {@inheritDoc} */ @Override - public UnmodifiableList<ITopLevelElementContext> getTopLevelElementContexts() { + public synchronized UnmodifiableList<ITopLevelElementContext> getTopLevelElementContexts() { return CollectionUtils.asUnmodifiable(contextCache); } /** {@inheritDoc} */ @Override - public boolean isTopLevelElement(EObject element) { + public synchronized boolean isTopLevelElement(EObject element) { for (ITopLevelElementContext context : contextCache) { if (context.getTopLevelElement() == element) { return true; @@ -89,7 +93,7 @@ public class PersistencyService implements IPersistencyService { /** {@inheritDoc} */ @Override - public boolean isDirty() { + public synchronized boolean isDirty() { for (ITopLevelElementContext context : contextCache) { if (context.isDirty()) { return true; @@ -100,14 +104,25 @@ public class PersistencyService implements IPersistencyService { /** {@inheritDoc} */ @Override - public void doSave(IProgressMonitor monitor) { - // TODO Auto-generated method stub - + public synchronized void doSave(IProgressMonitor monitor) { + for (ITopLevelElementContext context : contextCache) { + if (context.isDirty()) { + try { + context.doSave(monitor); + } catch (CoreException e) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + "Error during save operation.", e); + } catch (IOException e) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + "Error during save operation.", e); + } + } + } } /** {@inheritDoc} */ @Override - public void refreshTopLevelElements(IStorageProvider provider) { + public synchronized void refreshTopLevelElements(IStorageProvider provider) { if (provider == null) { return; } @@ -137,7 +152,7 @@ public class PersistencyService implements IPersistencyService { /** {@inheritDoc} */ @Override - public void addTopLevelElementListener( + public synchronized void addTopLevelElementListener( ITopLevelElementChangeListener listener) { if (!listeners.contains(listener)) { listeners.add(listener); @@ -159,7 +174,8 @@ public class PersistencyService implements IPersistencyService { } /** Notifies listener about top-level element removal. */ - private void notifyListenersAboutRemove(ITopLevelElementContext top) { + private synchronized void notifyListenersAboutRemove( + ITopLevelElementContext top) { for (ITopLevelElementChangeListener listener : listeners) { listener.topLevelElementRemoved(top); } @@ -167,7 +183,7 @@ public class PersistencyService implements IPersistencyService { /** {@inheritDoc} */ @Override - public ITopLevelElementContext getTopLevelElementContextFor( + public synchronized ITopLevelElementContext getTopLevelElementContextFor( EObject modelElement) { while (modelElement != null) { for (ITopLevelElementContext context : contextCache) { @@ -198,4 +214,15 @@ public class PersistencyService implements IPersistencyService { } } } + + /** Initializes the top-level element contexts. */ + private void initializeTopLevelElementContexts() { + for (IStorageProvider provider : storageProviderList) { + for (ITopLevelElementContext context : provider + .getTopLevelElementContexts()) { + contextCache.add(context); + storageProviderCache.put(context, provider); + } + } + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java index ae01f485611e05a8cd1be216118c3a5ed2913db6..0668d0c8941ce2f05a114e22695a1762db6ddffc 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java @@ -33,12 +33,16 @@ import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.ToolingKernelActivator; +import org.fortiss.tooling.kernel.interfaces.IEclipseResourceStorageLocationProvider; import org.fortiss.tooling.kernel.interfaces.IStorageProvider; import org.fortiss.tooling.kernel.interfaces.ITopLevelElementContext; import org.fortiss.tooling.kernel.services.IPersistencyService; +import org.fortiss.tooling.kernel.util.ExtensionPointUtils; import org.fortiss.tooling.kernel.util.LoggingUtils; +import org.osgi.framework.Bundle; /** * This class implements the persistency service behavior for Eclipse file @@ -47,10 +51,20 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: E8F12BF14037AEDE9A02AE20B99271A6 + * @ConQAT.Rating YELLOW Hash: FBF0D92A524C593E2AC98117B492168A */ public class EclipseResourceStorageProvider implements IResourceChangeListener, IResourceDeltaVisitor, IStorageProvider { + + /** The prototype provider extension point ID. */ + private static final String EXTENSION_POINT_NAME = "org.fortiss.tooling.kernel.eclipseResourceStorageLocationProvider"; + + /** The prototype provider configuration element name. */ + private static final String CONFIGURATION_ELEMENT_NAME = "storageLocationProvider"; + + /** Stores the registered storage providers. */ + private final List<IEclipseResourceStorageLocationProvider> storageProviderList = new ArrayList<IEclipseResourceStorageLocationProvider>(); + /** Cache of models loaded so far. */ private final Map<IFile, ModelContext> loadedContexts = new HashMap<IFile, ModelContext>(); @@ -59,6 +73,7 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, /** Constructor. */ public EclipseResourceStorageProvider() { + setupLocationProviders(); ResourcesPlugin.getWorkspace().addResourceChangeListener(this); searchWorkspaceForModels(); } @@ -74,9 +89,11 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, for (IResource res : project.members()) { if (res instanceof IFile) { IFile file = (IFile) res; - // TODO (FH): use an extension mechanism for this check - if (file.getFileExtension().equals("af3_20")) { - loadContext(file); + for (IEclipseResourceStorageLocationProvider provider : storageProviderList) { + if (provider.isStorageLocation(file)) { + loadContext(file); + break; + } } } } @@ -136,30 +153,6 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, private void handleChange(final IFile file) { final ModelContext context = loadedContexts.get(file); if (!context.getLastChangeWasIntended()) { - // TODO (FH): find a solution for this ui code - // Display.getDefault().asyncExec(new Runnable() { - // @Override - // public void run() { - // final boolean reload = true; - // // MessageUtils.askQuestion( - // // "Reload changed file?", - // // "The file " - // // + file.getName() - // // + " changed on disk. " - // // + "Load these changes? " - // // + - // // "Note that loading the changes will discard all editors, " - // // + - // // "so all unsaved changes and the undo history will be lost. " - // // + "However if you do not reload now, " - // // + "the contents of the file will be overwritten " - // // + "the next time you perform a save."); - // - // if (reload) { - // } - // - // } - // }); unloadContext(file); try { loadContext(file).setLastChangeWasIntended(); @@ -203,4 +196,23 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, result.addAll(rootElementContexts.values()); return result; } + + /** Initializes the storage provider list from plugin extensions. */ + private void setupLocationProviders() { + for (IConfigurationElement ce : ExtensionPointUtils + .getConfigurationElements(EXTENSION_POINT_NAME, + CONFIGURATION_ELEMENT_NAME)) { + Bundle bundle = ExtensionPointUtils.getBundle(ce); + try { + Class<?> handlerClass = ExtensionPointUtils.loadClass( + ce.getAttribute("provider"), bundle); + IEclipseResourceStorageLocationProvider provider = (IEclipseResourceStorageLocationProvider) handlerClass + .getConstructor().newInstance(); + storageProviderList.add(provider); + } catch (Exception ex) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + ex.getMessage(), ex); + } + } + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java index 87260939a9ce380145c92c222c31ce05576670bd..37c17ff6c857574bf03a88ce845e8d7f8de6727c 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java @@ -57,7 +57,7 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 8EED08FDCAC443A797F6BE7F17F747B1 + * @ConQAT.Rating RED Hash: 6C872459359461C3FF854B5CC6E99FF5 */ class ModelContext implements ITopLevelElementContext {