Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-11-15 12:45:16 +0000
committerAnsgar Radermacher2013-11-15 15:07:52 +0000
commit87c39719bf04ae68ed300e770ffbf75667c00859 (patch)
treeb579b811ea93165bfae4efb9b26c930485420963 /extraplugins
parentdd8fb24b5bdf1623a0f91988e5fab777c5d27499 (diff)
downloadorg.eclipse.papyrus-87c39719bf04ae68ed300e770ffbf75667c00859.tar.gz
org.eclipse.papyrus-87c39719bf04ae68ed300e770ffbf75667c00859.tar.xz
org.eclipse.papyrus-87c39719bf04ae68ed300e770ffbf75667c00859.zip
- trivial: remove possibility to edit datatypes (generator only produces .h, but no .cpp file)
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java7
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java2
2 files changed, 2 insertions, 7 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java
index 84acc507632..a869213777e 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java
@@ -334,11 +334,8 @@ public class PapyrusCDTEditor extends CEditor {
URI uri = papyrusTextInstance.eResource().getURI();
Classifier classifier = (Classifier)papyrusTextInstance.getEditedObject();
srcFile = SyncModelToCDT.syncModelToCDT(classifier);
- if (srcFile == null) {
- throw new PartInitException("Code generation before editing was not attempted. In most cases, this indicates that the projet (in which your model is stored) does not have a CDT nature"); //$NON-NLS-1$
- }
- if(!srcFile.exists()) {
- throw new PartInitException("Code generation before editing failed");
+ if (srcFile == null || !srcFile.exists()) {
+ throw new PartInitException("Code generation before editing failed. Please check error log");
}
IEditorInput newInput = new FileEditorInput(srcFile);
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
index f7f9cb4600b..56d94f54026 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
@@ -49,7 +49,6 @@ import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelFacto
import org.eclipse.swt.SWT;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Transition;
@@ -73,7 +72,6 @@ public class PapyrusCDTEditorHandler extends CmdHandler {
public boolean isEnabled() {
updateSelectedEObject();
if (selectedEObject instanceof Class ||
- selectedEObject instanceof DataType ||
selectedEObject instanceof Operation ||
selectedEObject instanceof Transition)
{

Back to the top