Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2016-03-08 14:23:36 +0000
committerPierre-Charles David2016-03-22 08:04:56 +0000
commit4813c7a686db5061be9e7dce2e3aaf438a11521d (patch)
treefab1eddc450118600fdb183141c2db5f8b6afaca
parent64c89ccdd9352a18cf481a964c6c4a6b5f1b4deb (diff)
downloadorg.eclipse.sirius-4813c7a686db5061be9e7dce2e3aaf438a11521d.tar.gz
org.eclipse.sirius-4813c7a686db5061be9e7dce2e3aaf438a11521d.tar.xz
org.eclipse.sirius-4813c7a686db5061be9e7dce2e3aaf438a11521d.zip
[458751] Remove dependency from oes.ui to the JDT
The only actual code dependency left was in ModelingToggleNatureAction, to be able to get the IProject from a JavaProject. However the way we did this actually only depended on the fact that JavaProject implements IProjectNature and has a getProject() method. Using the more generic IProjectNature type makes the code more general and allows us to remove the dependency to org.eclipse.jdt.core. Bug: 458751 Change-Id: I4598ba18038605dc9b863a3077c90ecfc9e62b3e Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html7
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile1
-rw-r--r--plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/actions/nature/ModelingToggleNatureAction.java10
5 files changed, 15 insertions, 8 deletions
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index b0c6abbedc..750e389074 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -259,6 +259,13 @@
<code>org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource</code> has been modified to use
<code>SiriusExtensiblePropertyDescriptor</code> to provide not editable properties view when the object, selected from the Model Explorer view, cannot be modified.
</li>
+ <li><span class="label label-danger">Removed</span> The
+ <code>org.eclipse.sirius.ui</code>, and thus the whole
+ <code>org.eclipse.sirius.runtime</code> feature no longer depends on the JDT (technically the dependency towards
+ <code>org.eclipse.jdt.core</code> has been removed). If you need the JDT Core in your environment, you will need to add the dependency explicitly. The
+ <code>org.eclipse.sirius.common.xtext</code> plug-in (which is optional) still depends on the JDT, and the Sirius specification environment (
+ <code>org.eclipse.sirius.editor</code>) still depends on PDE (and thus indirectly the JDT too).
+ </li>
</ul>
<h4 id="Changesinorg.eclipse.sirius.tests.swtbot.support">Changes in
<code>org.eclipse.sirius.tests.swtbot.support</code>
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index b79de4ffa2..3ec17fab9b 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -73,6 +73,7 @@ h4. Changes in @org.eclipse.sirius.ui@
* <span class="label label-success">Added</span> @org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertyDescriptor@ has been added to provide a specific @ExtensiblePropertyDescriptor@ which test @IPermissionAuthority@ to make properties view editable or not.
* <span class="label label-info">Modified</span> @org.eclipse.sirius.ui.tools.api.properties.SiriusExtensiblePropertySource@ has been modified to use @SiriusExtensiblePropertyDescriptor@ to provide not editable properties view when the object, selected from the Model Explorer view, cannot be modified.
+* <span class="label label-danger">Removed</span> The @org.eclipse.sirius.ui@, and thus the whole @org.eclipse.sirius.runtime@ feature no longer depends on the JDT (technically the dependency towards @org.eclipse.jdt.core@ has been removed). If you need the JDT Core in your environment, you will need to add the dependency explicitly. The @org.eclipse.sirius.common.xtext@ plug-in (which is optional) still depends on the JDT, and the Sirius specification environment (@org.eclipse.sirius.editor@) still depends on PDE (and thus indirectly the JDT too).
h4. Changes in @org.eclipse.sirius.tests.swtbot.support@
diff --git a/plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF
index eb6bc3a7e5..af6089e078 100644
--- a/plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF
@@ -18,8 +18,8 @@ Require-Bundle: org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.300",
org.eclipse.emf.validation;bundle-version="1.4.0",
org.eclipse.ui.navigator;bundle-version="3.5.200",
org.eclipse.jface.text;bundle-version="3.8.2",
- org.eclipse.pde.core;bundle-version="3.8.1",
- org.eclipse.equinox.frameworkadmin;bundle-version="2.0.100"
+ org.eclipse.equinox.frameworkadmin;bundle-version="2.0.100",
+ org.eclipse.pde.core;bundle-version="3.8.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Eclipse-LazyStart: true
Export-Package: org.eclipse.sirius.editor.assist.content;version="2.0.4",
diff --git a/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
index 50f391fa23..4de5c29ad5 100644
--- a/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ui/META-INF/MANIFEST.MF
@@ -106,7 +106,6 @@ Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
org.eclipse.emf.workspace;bundle-version="1.5.1",
org.eclipse.emf.ecore.edit;bundle-version="2.8.0";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="2.8.1",
- org.eclipse.jdt.core;bundle-version="3.8.1",
org.eclipse.emf.edit.ui;bundle-version="2.8.0",
org.eclipse.ui.ide;bundle-version="3.8.2",
org.eclipse.ui.navigator;bundle-version="3.5.200",
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/actions/nature/ModelingToggleNatureAction.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/actions/nature/ModelingToggleNatureAction.java
index 9ed704d12d..546223ead9 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/actions/nature/ModelingToggleNatureAction.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/actions/nature/ModelingToggleNatureAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2015 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2012, 2016 THALES GLOBAL SERVICES and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,10 +18,10 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -59,9 +59,9 @@ public class ModelingToggleNatureAction extends AbstractHandler {
for (Object object : ((IStructuredSelection) currentSelection).toList()) {
if (object instanceof IProject) {
selectedProjects.add((IProject) object);
- } else if (object instanceof JavaProject) {
- JavaProject javaProject = (JavaProject) object;
- selectedProjects.add(javaProject.getProject());
+ } else if (object instanceof IProjectNature) {
+ IProjectNature nature = (IProjectNature) object;
+ selectedProjects.add(nature.getProject());
} else if (Platform.getAdapterManager().getAdapter(object, IProject.class) instanceof IProject) {
selectedProjects.add((IProject) Platform.getAdapterManager().getAdapter(object, IProject.class));
}

Back to the top