From 1519a5e9620f7e39854326756d54e0652a596b1d Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 18:56:54 +0100 Subject: [Releng] Remove epf-richtext sources from the repository --- .../org.eclipse.epf.common.html/.classpath | 8 - .../org.eclipse.epf.common.html/.project | 17 - .../META-INF/MANIFEST.MF | 14 - .../org.eclipse.epf.common.html/about.html | 22 - .../org.eclipse.epf.common.html/build.properties | 8 - .../org.eclipse.epf.common.html/lib/Tidy.jar | Bin 177868 -> 0 bytes .../org.eclipse.epf.common.html/plugin.properties | 16 - .../org.eclipse.epf.common.html/plugin.xml | 15 - .../eclipse/epf/common/html/CommonHTMLPlugin.java | 56 - .../epf/common/html/DefaultHTMLFormatter.java | 286 ---- .../eclipse/epf/common/html/DefaultHTMLParser.java | 212 --- .../org.eclipse.epf.common.ui/.classpath | 7 - .../org.eclipse.epf.common.ui/.project | 28 - .../.settings/org.eclipse.pde.core.prefs | 4 - .../org.eclipse.epf.common.ui/META-INF/MANIFEST.MF | 15 - .../org.eclipse.epf.common.ui/about.html | 22 - .../org.eclipse.epf.common.ui/build.properties | 5 - .../org.eclipse.epf.common.ui/plugin.properties | 15 - .../org/eclipse/epf/common/ui/AbstractPlugin.java | 529 ------- .../org/eclipse/epf/common/ui/CommonUIPlugin.java | 71 - .../org/eclipse/epf/common/ui/ContextProvider.java | 37 - .../org/eclipse/epf/common/ui/MessageCallback.java | 59 - .../epf/common/ui/PreferenceStoreWrapper.java | 532 ------- .../epf/common/ui/PropertyChangeEventWrapper.java | 65 - .../common/ui/actions/CComboContributionItem.java | 164 -- .../eclipse/epf/common/ui/util/ClipboardUtil.java | 122 -- .../epf/common/ui/util/CommonPreferences.java | 60 - .../epf/common/ui/util/ErrorDialogNoReason.java | 598 ------- .../org/eclipse/epf/common/ui/util/MenuUtil.java | 47 - .../src/org/eclipse/epf/common/ui/util/MsgBox.java | 123 -- .../org/eclipse/epf/common/ui/util/MsgDialog.java | 626 -------- .../epf/common/ui/util/PerspectiveUtil.java | 127 -- .../eclipse/epf/common/ui/util/PreferenceUtil.java | 173 -- .../epf/common/ui/util/WrappedMessageDialog.java | 208 --- .../.classpath | 7 - .../.project | 28 - .../META-INF/MANIFEST.MF | 10 - .../about.html | 22 - .../build.properties | 6 - .../plugin.properties | 15 - .../epf/common/win32/Win32HTMLTransfer.java | 218 --- .../src/org/eclipse/epf/common/win32/package.html | 5 - .../.classpath | 7 - .../.project | 28 - .../META-INF/MANIFEST.MF | 10 - .../about.html | 22 - .../build.properties | 6 - .../plugin.properties | 15 - .../epf/common/win32/Win32HTMLTransfer.java | 218 --- .../src/org/eclipse/epf/common/win32/package.html | 5 - .../epf-richtext/org.eclipse.epf.common/.classpath | 7 - .../epf-richtext/org.eclipse.epf.common/.project | 28 - .../org.eclipse.epf.common/META-INF/MANIFEST.MF | 21 - .../epf-richtext/org.eclipse.epf.common/about.html | 22 - .../org.eclipse.epf.common/build.properties | 7 - .../org.eclipse.epf.common/plugin.properties | 15 - .../epf-richtext/org.eclipse.epf.common/plugin.xml | 8 - .../schema/htmlFormatter.exsd | 105 -- .../org.eclipse.epf.common/schema/htmlParser.exsd | 105 -- .../schema/markerAttributeContributer.exsd | 111 -- .../schema/objectFactory.exsd | 102 -- .../org/eclipse/epf/common/AbstractActivator.java | 518 ------ .../src/org/eclipse/epf/common/CommonPlugin.java | 82 - .../src/org/eclipse/epf/common/IActivator.java | 23 - .../org/eclipse/epf/common/IContextProvider.java | 15 - .../src/org/eclipse/epf/common/IHTMLFormatter.java | 39 - .../src/org/eclipse/epf/common/IHTMLParser.java | 25 - .../org/eclipse/epf/common/IMessageCallback.java | 26 - .../src/org/eclipse/epf/common/package.html | 5 - .../preferences/IPreferenceStoreWrapper.java | 440 ------ .../preferences/IPropertyChangeEventWrapper.java | 50 - .../IPropertyChangeListenerWrapper.java | 23 - .../epf/common/serviceability/DebugTrace.java | 104 -- .../eclipse/epf/common/serviceability/Logger.java | 134 -- .../eclipse/epf/common/serviceability/package.html | 5 - .../eclipse/epf/common/utils/ExtensionHelper.java | 216 --- .../src/org/eclipse/epf/common/utils/FileUtil.java | 1285 --------------- .../src/org/eclipse/epf/common/utils/I18nUtil.java | 219 --- .../common/utils/IMarkerAttributeContributer.java | 25 - .../eclipse/epf/common/utils/IObjectFactory.java | 23 - .../org/eclipse/epf/common/utils/ImageUtil.java | 179 --- .../src/org/eclipse/epf/common/utils/MathUtil.java | 25 - .../src/org/eclipse/epf/common/utils/NetUtil.java | 400 ----- .../eclipse/epf/common/utils/ProfilingUtil.java | 60 - .../eclipse/epf/common/utils/RestartableJob.java | 123 -- .../src/org/eclipse/epf/common/utils/StrUtil.java | 676 -------- .../eclipse/epf/common/utils/StringMatcher.java | 458 ------ .../org/eclipse/epf/common/utils/ThreadUtil.java | 41 - .../src/org/eclipse/epf/common/utils/Timer.java | 49 - .../src/org/eclipse/epf/common/utils/WarUtil.java | 57 - .../src/org/eclipse/epf/common/utils/XMLUtil.java | 666 -------- .../src/org/eclipse/epf/common/utils/ZipUtil.java | 106 -- .../src/org/eclipse/epf/common/utils/package.html | 5 - .../eclipse/epf/common/xml/AbstractSAXParser.java | 216 --- .../org/eclipse/epf/common/xml/XSLTProcessor.java | 449 ------ .../src/org/eclipse/epf/common/xml/package.html | 5 - .../org.eclipse.epf.richtext.feature/.project | 17 - .../build.properties | 4 - .../org.eclipse.epf.richtext.feature/epl-v10.html | 304 ---- .../feature.properties | 141 -- .../org.eclipse.epf.richtext.feature/feature.xml | 82 - .../org.eclipse.epf.richtext.feature/license.html | 79 - .../org.eclipse.epf.richtext/.classpath | 16 - .../epf-richtext/org.eclipse.epf.richtext/.project | 28 - .../org.eclipse.epf.richtext/META-INF/MANIFEST.MF | 22 - .../org.eclipse.epf.richtext/about.html | 22 - .../org.eclipse.epf.richtext/about.ini | 18 - .../org.eclipse.epf.richtext/about.mappings | 7 - .../org.eclipse.epf.richtext/about.properties | 49 - .../org.eclipse.epf.richtext/application_32.gif | Bin 1706 -> 0 bytes .../org.eclipse.epf.richtext/build.properties | 24 - .../icons/full/dtool16/AddCode.gif | Bin 349 -> 0 bytes .../icons/full/dtool16/AddImage.gif | Bin 576 -> 0 bytes .../icons/full/dtool16/AddLink.gif | Bin 225 -> 0 bytes .../icons/full/dtool16/AddOrderedList.gif | Bin 106 -> 0 bytes .../icons/full/dtool16/AddTable.gif | Bin 348 -> 0 bytes .../icons/full/dtool16/AddUnorderedList.gif | Bin 103 -> 0 bytes .../icons/full/dtool16/Bold.gif | Bin 104 -> 0 bytes .../icons/full/dtool16/ClearContent.gif | Bin 328 -> 0 bytes .../icons/full/dtool16/Copy.gif | Bin 364 -> 0 bytes .../icons/full/dtool16/Cut.gif | Bin 138 -> 0 bytes .../icons/full/dtool16/FindReplace.gif | Bin 332 -> 0 bytes .../icons/full/dtool16/Indent.gif | Bin 135 -> 0 bytes .../icons/full/dtool16/Italic.gif | Bin 79 -> 0 bytes .../icons/full/dtool16/Outdent.gif | Bin 137 -> 0 bytes .../icons/full/dtool16/Paste.gif | Bin 361 -> 0 bytes .../icons/full/dtool16/PastePlainText.gif | Bin 560 -> 0 bytes .../icons/full/dtool16/Subscript.gif | Bin 85 -> 0 bytes .../icons/full/dtool16/Superscript.gif | Bin 83 -> 0 bytes .../icons/full/dtool16/TidyHTML.gif | Bin 352 -> 0 bytes .../icons/full/dtool16/Underline.gif | Bin 88 -> 0 bytes .../icons/full/etool16/AddCode.gif | Bin 349 -> 0 bytes .../icons/full/etool16/AddImage.gif | Bin 1024 -> 0 bytes .../icons/full/etool16/AddLine.gif | Bin 73 -> 0 bytes .../icons/full/etool16/AddLink.gif | Bin 942 -> 0 bytes .../icons/full/etool16/AddOrderedList.gif | Bin 152 -> 0 bytes .../icons/full/etool16/AddTable.gif | Bin 982 -> 0 bytes .../icons/full/etool16/AddUnorderedList.gif | Bin 139 -> 0 bytes .../icons/full/etool16/Bold.gif | Bin 132 -> 0 bytes .../icons/full/etool16/ClearContent.gif | Bin 162 -> 0 bytes .../icons/full/etool16/Copy.gif | Bin 994 -> 0 bytes .../icons/full/etool16/Cut.gif | Bin 913 -> 0 bytes .../icons/full/etool16/FindReplace.gif | Bin 947 -> 0 bytes .../icons/full/etool16/Indent.gif | Bin 905 -> 0 bytes .../icons/full/etool16/Italic.gif | Bin 123 -> 0 bytes .../icons/full/etool16/JustifyCenter.gif | Bin 67 -> 0 bytes .../icons/full/etool16/JustifyFull.gif | Bin 67 -> 0 bytes .../icons/full/etool16/JustifyLeft.gif | Bin 67 -> 0 bytes .../icons/full/etool16/JustifyRight.gif | Bin 67 -> 0 bytes .../icons/full/etool16/Outdent.gif | Bin 905 -> 0 bytes .../icons/full/etool16/Paste.gif | Bin 1005 -> 0 bytes .../icons/full/etool16/PastePlainText.gif | Bin 588 -> 0 bytes .../icons/full/etool16/StrikeThrough.gif | Bin 76 -> 0 bytes .../icons/full/etool16/Subscript.gif | Bin 130 -> 0 bytes .../icons/full/etool16/Superscript.gif | Bin 133 -> 0 bytes .../icons/full/etool16/TidyHTML.gif | Bin 971 -> 0 bytes .../icons/full/etool16/Underline.gif | Bin 138 -> 0 bytes .../org.eclipse.epf.richtext/messages.properties | 160 -- .../org.eclipse.epf.richtext/plugin.properties | 34 - .../org.eclipse.epf.richtext/rte/blank.htm | 9 - .../org.eclipse.epf.richtext/rte/rte.css | 457 ------ .../org.eclipse.epf.richtext/rte/rte.html | 20 - .../org.eclipse.epf.richtext/rte/rte.js | 1490 ----------------- .../org.eclipse.epf.richtext/rte/rte.xsl | 32 - .../src/org/eclipse/epf/richtext/IRichText.java | 355 ----- .../org/eclipse/epf/richtext/IRichTextEditor.java | 50 - .../org/eclipse/epf/richtext/IRichTextToolBar.java | 72 - .../src/org/eclipse/epf/richtext/Messages.java | 145 -- .../org/eclipse/epf/richtext/Resources.properties | 160 -- .../src/org/eclipse/epf/richtext/RichText.java | 1671 -------------------- .../org/eclipse/epf/richtext/RichTextCommand.java | 267 ---- .../org/eclipse/epf/richtext/RichTextEditor.java | 1555 ------------------ .../eclipse/epf/richtext/RichTextEditorForm.java | 59 - .../eclipse/epf/richtext/RichTextFormToolkit.java | 91 -- .../org/eclipse/epf/richtext/RichTextImages.java | 475 ------ .../org/eclipse/epf/richtext/RichTextListener.java | 66 - .../org/eclipse/epf/richtext/RichTextPlugin.java | 80 - .../eclipse/epf/richtext/RichTextResources.java | 148 -- .../eclipse/epf/richtext/RichTextSelection.java | 150 -- .../org/eclipse/epf/richtext/RichTextToolBar.java | 191 --- .../epf/richtext/actions/AddCodeAction.java | 42 - .../epf/richtext/actions/AddImageAction.java | 76 - .../epf/richtext/actions/AddLineAction.java | 58 - .../epf/richtext/actions/AddLinkAction.java | 74 - .../epf/richtext/actions/AddOrderedListAction.java | 59 - .../epf/richtext/actions/AddTableAction.java | 81 - .../richtext/actions/AddUnorderedListAction.java | 59 - .../epf/richtext/actions/BaseRichTextAction.java | 83 - .../epf/richtext/actions/BlockTagAction.java | 81 - .../eclipse/epf/richtext/actions/BoldAction.java | 67 - .../epf/richtext/actions/ClearContentAction.java | 64 - .../eclipse/epf/richtext/actions/CopyAction.java | 84 - .../eclipse/epf/richtext/actions/CutAction.java | 76 - .../epf/richtext/actions/FindReplaceAction.java | 388 ----- .../epf/richtext/actions/FontNameAction.java | 121 -- .../epf/richtext/actions/FontSizeAction.java | 106 -- .../epf/richtext/actions/FontStyleAction.java | 94 -- .../epf/richtext/actions/IBaseRichTextAction.java | 62 - .../epf/richtext/actions/IRichTextAction.java | 97 -- .../epf/richtext/actions/IRichTextComboAction.java | 76 - .../eclipse/epf/richtext/actions/IndentAction.java | 59 - .../eclipse/epf/richtext/actions/ItalicAction.java | 67 - .../epf/richtext/actions/JustifyCenterAction.java | 58 - .../epf/richtext/actions/JustifyFullAction.java | 58 - .../epf/richtext/actions/JustifyLeftAction.java | 58 - .../epf/richtext/actions/JustifyRightAction.java | 58 - .../epf/richtext/actions/OutdentAction.java | 59 - .../eclipse/epf/richtext/actions/PasteAction.java | 247 --- .../epf/richtext/actions/PastePlainTextAction.java | 62 - .../epf/richtext/actions/RichTextAction.java | 158 -- .../epf/richtext/actions/RichTextComboAction.java | 148 -- .../epf/richtext/actions/SubscriptAction.java | 68 - .../epf/richtext/actions/SuperscriptAction.java | 69 - .../eclipse/epf/richtext/actions/TidyAction.java | 95 -- .../epf/richtext/actions/TidyActionGroup.java | 82 - .../epf/richtext/actions/UnderlineAction.java | 68 - .../org/eclipse/epf/richtext/actions/package.html | 5 - .../epf/richtext/dialogs/AddCodeDialog.java | 79 - .../epf/richtext/dialogs/AddImageDialog.java | 143 -- .../epf/richtext/dialogs/AddLinkDialog.java | 126 -- .../epf/richtext/dialogs/AddTableDialog.java | 220 --- .../eclipse/epf/richtext/dialogs/BaseDialog.java | 91 -- .../epf/richtext/dialogs/FindReplaceDialog.java | 337 ---- .../org/eclipse/epf/richtext/dialogs/package.html | 5 - .../org/eclipse/epf/richtext/html/BlockTag.java | 195 --- .../org/eclipse/epf/richtext/html/FontName.java | 150 -- .../org/eclipse/epf/richtext/html/FontStyle.java | 197 --- .../src/org/eclipse/epf/richtext/html/Image.java | 59 - .../src/org/eclipse/epf/richtext/html/Link.java | 89 -- .../src/org/eclipse/epf/richtext/html/Table.java | 196 --- .../src/org/eclipse/epf/richtext/html/package.html | 5 - .../src/org/eclipse/epf/richtext/package.html | 5 - .../preferences/RichTextPreferencePage.java | 183 --- .../richtext/preferences/RichTextPreferences.java | 51 - .../RichTextPreferencesInitializer.java | 45 - .../eclipse/epf/richtext/preferences/package.html | 5 - 236 files changed, 26214 deletions(-) delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/lib/Tidy.jar delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.xml delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/CommonHTMLPlugin.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLFormatter.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLParser.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/.settings/org.eclipse.pde.core.prefs delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/AbstractPlugin.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/CommonUIPlugin.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/ContextProvider.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/MessageCallback.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PreferenceStoreWrapper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PropertyChangeEventWrapper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/actions/CComboContributionItem.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ClipboardUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/CommonPreferences.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ErrorDialogNoReason.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MenuUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgBox.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PerspectiveUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PreferenceUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/WrappedMessageDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/plugin.xml delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlFormatter.exsd delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlParser.exsd delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/schema/markerAttributeContributer.exsd delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/schema/objectFactory.exsd delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IActivator.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IContextProvider.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLFormatter.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLParser.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeEventWrapper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/DebugTrace.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ExtensionHelper.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/I18nUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IMarkerAttributeContributer.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IObjectFactory.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ImageUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MathUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/NetUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/RestartableJob.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StrUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StringMatcher.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ThreadUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/Timer.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/WarUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/XMLUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ZipUtil.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/AbstractSAXParser.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/XSLTProcessor.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/epl-v10.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.xml delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/license.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/.classpath delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/.project delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/META-INF/MANIFEST.MF delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/about.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/about.ini delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/about.mappings delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/about.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/application_32.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/build.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddCode.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddImage.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddLink.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddOrderedList.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddTable.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddUnorderedList.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Bold.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/ClearContent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Copy.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Cut.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/FindReplace.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Indent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Italic.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Outdent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Paste.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/PastePlainText.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Subscript.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Superscript.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/TidyHTML.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Underline.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddCode.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddImage.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLine.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLink.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddOrderedList.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddTable.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddUnorderedList.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Bold.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/ClearContent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Copy.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Cut.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/FindReplace.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Indent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Italic.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyCenter.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyFull.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyLeft.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyRight.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Outdent.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Paste.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/PastePlainText.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/StrikeThrough.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Subscript.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Superscript.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/TidyHTML.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Underline.gif delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/messages.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/plugin.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/blank.htm delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.css delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.js delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.xsl delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichText.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextEditor.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextToolBar.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Messages.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Resources.properties delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichText.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextCommand.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextEditor.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextEditorForm.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextFormToolkit.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextImages.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextListener.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextResources.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextSelection.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextToolBar.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddCodeAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddImageAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLineAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLinkAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddOrderedListAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddTableAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddUnorderedListAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BaseRichTextAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BlockTagAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BoldAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ClearContentAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CopyAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CutAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FindReplaceAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontNameAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontSizeAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontStyleAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IBaseRichTextAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextComboAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IndentAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ItalicAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyCenterAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyFullAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyLeftAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyRightAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/OutdentAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PastePlainTextAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextComboAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SubscriptAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SuperscriptAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyActionGroup.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/UnderlineAction.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddCodeDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddImageDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddLinkDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddTableDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/BaseDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/FindReplaceDialog.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/BlockTag.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontName.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontStyle.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Image.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Link.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Table.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/package.html delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencePage.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferences.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencesInitializer.java delete mode 100644 extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/package.html (limited to 'extraplugins') diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.common.html/.classpath deleted file mode 100644 index 8db29a6be58..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/.project b/extraplugins/epf-richtext/org.eclipse.epf.common.html/.project deleted file mode 100644 index 4fa523f8557..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.epf.common.html - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.common.html/META-INF/MANIFEST.MF deleted file mode 100644 index 566a52ac1ec..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.common.html;singleton:=true -Bundle-Version: 1.5.0.qualifier -Bundle-ClassPath: commonHTML.jar,lib/Tidy.jar -Bundle-Activator: org.eclipse.epf.common.html.CommonHTMLPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Require-Bundle: org.eclipse.epf.common -Eclipse-LazyStart: true -Export-Package: org.eclipse.epf.common.html -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/about.html b/extraplugins/epf-richtext/org.eclipse.epf.common.html/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.html/build.properties deleted file mode 100644 index cb33cb2a0e2..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.commonHTML.jar = src/ -output.commonHTML.jar = bin/ -bin.includes = commonHTML.jar,\ - plugin.properties,\ - META-INF/,\ - about.html,\ - plugin.xml,\ - lib/ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/lib/Tidy.jar b/extraplugins/epf-richtext/org.eclipse.epf.common.html/lib/Tidy.jar deleted file mode 100644 index af4eed0506b..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.common.html/lib/Tidy.jar and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.properties deleted file mode 100644 index 6372abf9e60..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.properties +++ /dev/null @@ -1,16 +0,0 @@ -# NLS_ENCODING=UNICODE -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Common HTML -providerName=Eclipse.org diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.xml b/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.xml deleted file mode 100644 index f6af5e2d3ca..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/plugin.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/CommonHTMLPlugin.java b/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/CommonHTMLPlugin.java deleted file mode 100644 index ae5a9f9c28f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/CommonHTMLPlugin.java +++ /dev/null @@ -1,56 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.html; - -import org.eclipse.epf.common.AbstractActivator; -import org.osgi.framework.BundleContext; - -/** - * The Common plug-in activator. - */ -public final class CommonHTMLPlugin extends AbstractActivator { - - // The shared plug-in instance. - private static CommonHTMLPlugin plugin; - - /** - * Creates a new instance. - */ - public CommonHTMLPlugin() { - super(); - plugin = this; - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - super.stop(context); - plugin = null; - } - - /** - * Gets the shared instance. - * - * @return the shared plug-in instance - */ - public static CommonHTMLPlugin getDefault() { - return plugin; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLFormatter.java b/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLFormatter.java deleted file mode 100644 index eca7bf5a198..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLFormatter.java +++ /dev/null @@ -1,286 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.html; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; - -import org.eclipse.epf.common.IHTMLFormatter; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.epf.common.utils.StrUtil; -import org.w3c.tidy.Tidy; - -/** - * Pretty-formats HTML source and makes it XHTML compliant. - * - * @author Kelvin Low - * @since 1.0 - */ -public class DefaultHTMLFormatter implements IHTMLFormatter{ - - protected static final String HTML_BODY_START_TAG = " around each text block (?that isn't in a block already?) -// tidy.setEncloseBlockText(true); - // setting this seemed to prevent JTidy from indenting the source -// tidy.setPrintBodyOnly(true); - - if (forceOutput) { - // output document even if errors are present -// tidy.setForceOutput(true); - } - if (makeBare) { - // remove MS clutter -// tidy.setMakeBare(true); - tidy.setMakeClean(true); - } - if (word2000) { - // draconian Word2000 cleaning - tidy.setWord2000(true); - } - - -// Reader input = new StringReader(html); -// Writer output = new StringWriter(); - - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - tidy.setErrout(pw); - InputStream input= new ByteArrayInputStream(html.getBytes("UTF-8")); - - ByteArrayOutputStream output = new ByteArrayOutputStream(); - tidy.parse(input, output); - String error = sw.getBuffer().toString(); - if (error != null && error.length() > 0 - && error.startsWith("line") && error.indexOf("column") > 0) { //$NON-NLS-1$ //$NON-NLS-2$ - lastErrorStr = error; - if (!forceOutput) { - // if forceOutput is true, JTidy will return clean HTML so don't return here - return html; - } - } - - String formattedHTML = new String(output.toByteArray(), "UTF-8"); //$NON-NLS-1$ - formattedHTML = StrUtil.getEscapedHTML(formattedHTML); - - String htmlStartUpper = html.substring(0, Math.min(10, html.length())).toUpperCase(); - - if (returnBodyOnly || (!htmlStartUpper.startsWith("",startBodyTag); //$NON-NLS-1$ - } - int end = formattedHTML.indexOf(HTML_BODY_END_TAG); - if (start == -1 || end == -1) { - return ""; //$NON-NLS-1$ - } - start += 1; - if (start >= end) { - return ""; //$NON-NLS-1$ - } - start += FileUtil.LINE_SEP_LENGTH; - end -= FileUtil.LINE_SEP_LENGTH; - if (indent && indentSize > 0) { - end -= indentSize; - } - if (start >= end) { - return ""; //$NON-NLS-1$ - } - String result = formattedHTML.substring(start, end); - if (indent && indentSize > 0) { - String indentStr = getIndentStr(indentSize * 2); - result = fixIndentation(result, indentStr); - return result; - } - } - return formattedHTML; - } - - /** - * Returns the indent string. - */ - protected static String getIndentStr(int indentLength) { - if (indentLength == 0) { - return ""; //$NON-NLS-1$ - } - StringBuffer indentStr = new StringBuffer(); - for (int i = 0; i < indentLength; i++) { - indentStr.append(' '); - } - return indentStr.toString(); - } - - public static final String PRE_TAG_START = "
"; //$NON-NLS-1$
-
-	public static final String PRE_TAG_END = "
"; //$NON-NLS-1$ - - public static final int PRE_TAG_END_LENGTH = PRE_TAG_END.length(); - - /** - * Undo the JTidy indent, but ignore <pre> tags - * - * @param html - * @param indentStr - * @return - */ - protected static String fixIndentation(String html, String indentStr) { - if (html.startsWith(indentStr)) { - html = html.substring(indentStr.length()); - } - StringBuffer strBuf = new StringBuffer(); - int pre_index = -1; - int last_pre_end_index = -1; - while ((pre_index = html.indexOf(PRE_TAG_START, last_pre_end_index)) != -1) { - strBuf.append(html.substring( - last_pre_end_index < 0 ? 0 : last_pre_end_index - + PRE_TAG_END_LENGTH, pre_index).replaceAll( - "\r\n" + indentStr, "\r\n")); //$NON-NLS-1$ //$NON-NLS-2$ - last_pre_end_index = html.indexOf(PRE_TAG_END, pre_index); - if (last_pre_end_index != -1) { - strBuf.append(html.substring(pre_index, last_pre_end_index - + PRE_TAG_END_LENGTH)); - } else { - // found
, but no ending 
- shouldn't ever get here - // append rest of string and return it - strBuf.append(html.substring(pre_index)); - return strBuf.toString(); - } - } - strBuf.append(html.substring( - last_pre_end_index < 0 ? 0 : last_pre_end_index - + PRE_TAG_END_LENGTH).replaceAll("\r\n" + indentStr, //$NON-NLS-1$ - "\r\n")); //$NON-NLS-1$ - return strBuf.toString(); - } - - public String getLastErrorStr() { - return lastErrorStr; - } - - - public String removeLeadingWhitespace(String input) { - return p_whitespace.matcher(input).replaceAll(""); //$NON-NLS-1$ - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLParser.java b/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLParser.java deleted file mode 100644 index 9e99d55b3ed..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.html/src/org/eclipse/epf/common/html/DefaultHTMLParser.java +++ /dev/null @@ -1,212 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.html; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.Properties; - -import org.eclipse.epf.common.IHTMLParser; -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.tidy.Configuration; -import org.w3c.tidy.Tidy; - -/** - * Extracts the title, meta tags and text from a HTML file or source. - * - * @author Kelvin Low - * @since 1.0 - */ -public class DefaultHTMLParser implements IHTMLParser{ - - private static final int BUFFER_SIZE = 4096; - - private static final String HTML_SCRIPT_TAG = "script"; //$NON-NLS-1$ - - private static final String HTML_TITLE_TAG = "title"; //$NON-NLS-1$ - - private static final String HTML_META_TAG = "meta"; //$NON-NLS-1$ - - protected Tidy tidy; - - private String title; - - private String summary; - - private String text; - - private Properties metaTags; - - private StringBuffer htmlText; - - /** - * Creates a new instance. - */ - public DefaultHTMLParser() { - try { - tidy = new Tidy(); - tidy.setXHTML(true); - tidy.setDropEmptyParas(true); - tidy.setDropFontTags(true); - tidy.setQuiet(true); - tidy.setShowWarnings(false); - tidy.setSmartIndent(false); - tidy.setTidyMark(false); - tidy.setWraplen(132); - tidy.setIndentAttributes(false); - tidy.setIndentContent(false); - tidy.setSpaces(2); - tidy.setCharEncoding(Configuration.ISO2022); -// tidy.setInputEncoding("UTF-8"); //$NON-NLS-1$ -// tidy.setOutputEncoding("UTF-8"); //$NON-NLS-1$ - } catch (Exception e) { - tidy = null; - } - } - - /** - * Parses the given HTML file. - */ - public void parse(File file) throws Exception { - if (tidy == null || !file.exists() || !file.canRead()) { - return; - } - - FileInputStream fis = new FileInputStream(file); - InputStreamReader isr = new InputStreamReader(fis, "UTF-8"); //$NON-NLS-1$ - BufferedReader br = new BufferedReader(isr); - - StringBuffer textBuffer = new StringBuffer(BUFFER_SIZE); - char[] buffer = new char[BUFFER_SIZE]; - int charsRead; - while ((charsRead = br.read(buffer, 0, BUFFER_SIZE)) > 0) { - textBuffer.append(buffer, 0, charsRead); - } - - parse(textBuffer.toString()); - - if (br != null) { - try { - br.close(); - } catch (IOException e) { - } - } - } - - /** - * Parses the given HTML source. - */ - protected void parse(String htmlSource) throws Exception { - title = ""; //$NON-NLS-1$ - summary = ""; //$NON-NLS-1$ - text = ""; //$NON-NLS-1$ - metaTags = new Properties(); - - Document doc = getDocument(htmlSource); - if (doc != null) { - htmlText = new StringBuffer(1024); - extract(doc.getChildNodes()); - text = htmlText.toString(); - } - } - - /** - * Returns the title text. - */ - public String getTitle() { - return title; - } - - /** - * Returns the HTML meta tags. - */ - public Properties getMetaTags() { - return metaTags; - } - - /** - * Returns the summary. - */ - public String getSummary() { - return summary; - } - - /** - * Returns the body text. - */ - public String getText() { - return text; - } - - /** - * Returns the DOM document for the given HTML source. - */ - protected Document getDocument(String html) throws Exception { - if (html == null || html.length() == 0) { - return null; - } - - ByteArrayInputStream input = new ByteArrayInputStream(html - .getBytes("UTF-8")); //$NON-NLS-1$ - ByteArrayOutputStream output = new ByteArrayOutputStream(); - - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - tidy.setErrout(pw); - - return tidy.parseDOM(input, output); - } - - /** - * Extracts the title, meta tags and body text from the given nodes. - */ - protected void extract(NodeList nodes) { - for (int i = 0; i < nodes.getLength(); i++) { - Node node = nodes.item(i); - String nodeName = node.getNodeName(); - switch (node.getNodeType()) { - case Node.ELEMENT_NODE: - if (!nodeName.equals(HTML_SCRIPT_TAG)) { - NamedNodeMap attrs = node.getAttributes(); - for (int j = 0; j < attrs.getLength(); j++) { - Node attrNode = attrs.item(j); - String attrNodeName = attrNode.getNodeName(); - String attrNodeValue = attrNode.getNodeValue(); - if (attrNodeName.equals(HTML_TITLE_TAG)) { - title = attrNodeValue; - } else if (attrNodeName.equals(HTML_META_TAG)) { - metaTags.put(attrNodeName, attrNodeValue); - } - } - NodeList childNodes = node.getChildNodes(); - if (childNodes != null && childNodes.getLength() > 0) { - extract(childNodes); - } - } - break; - case Node.TEXT_NODE: - htmlText.append(node.getNodeValue()).append(' '); - break; - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.classpath deleted file mode 100644 index 02159672985..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.project b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.project deleted file mode 100644 index eacf917d8f1..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.epf.common.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.settings/org.eclipse.pde.core.prefs b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 0efa3f0b61e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Jan 04 15:09:09 PST 2008 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 376c2425211..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.common.ui -Bundle-Version: 1.5.0.qualifier -Bundle-Activator: org.eclipse.epf.common.ui.CommonUIPlugin -Import-Package: org.osgi.framework;version="1.3.0" -Eclipse-LazyStart: true -Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui;visibility:=reexport, - org.eclipse.epf.common;visibility:=reexport -Export-Package: org.eclipse.epf.common.ui, - org.eclipse.epf.common.ui.actions, - org.eclipse.epf.common.ui.util -Bundle-Vendor: %providerName diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/about.html b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/build.properties deleted file mode 100644 index f4ae9701586..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.properties diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/plugin.properties deleted file mode 100644 index b50cbf887d1..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/plugin.properties +++ /dev/null @@ -1,15 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Common UI plug-in -providerName=Eclipse.org diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/AbstractPlugin.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/AbstractPlugin.java deleted file mode 100644 index fa3ca270068..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/AbstractPlugin.java +++ /dev/null @@ -1,529 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.Properties; -import java.util.ResourceBundle; - -import org.eclipse.core.internal.runtime.InternalPlatform; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.Platform; -import org.eclipse.epf.common.IActivator; -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.common.ui.util.MsgDialog; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.epf.common.utils.I18nUtil; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * The abstract base class for all EPF plug-ins. - * - * @author Kelvin Low - * @author Jinhua Xi - * @author Phong Nguyen Le - * @since 1.0 - */ -public abstract class AbstractPlugin extends AbstractUIPlugin implements IActivator { - - - // The relative path to the icons. - private static final String ICON_PATH = "icons/"; //$NON-NLS-1$; - - // The logger hash map. - private static Map loggers = new HashMap(); - - // The message dialog hash map. - private static Map msgDialogs = new HashMap(); - - // The shared image hash map. - private static Map sharedImages = new HashMap(); - - // The resource bundle for this plug-in. - private ResourceBundle resourceBundle; - - // This plug-in ID. - private String pluginId; - - // The plug-in install URL. - private URL installURL; - - // The plug-in install path. - private String installPath; - - // The plug-in icon URL. - private URL iconURL; - - // The profiling flag. - private boolean profiling; - - /** - * Default constructor. - */ - public AbstractPlugin() { - super(); - } - - /** - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - - init(context); - - // set the - if (isDebugging()) { - getLogger().logInfo("Started " + pluginId); //$NON-NLS-1$ - } - } - - /** - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(BundleContext) - */ - public void stop(BundleContext context) throws Exception { - // Free the shared images. - for (Iterator images = sharedImages.values().iterator(); images - .hasNext();) { - Image image = (Image) images.next(); - if (image != null && !image.isDisposed()) { - image.dispose(); - } - } - - super.stop(context); - - if (isDebugging()) { - getLogger().logInfo("Stopped " + pluginId); //$NON-NLS-1$ - } - } - - /** - * Initializes this plug-in. - * - * @param context - * The bundle context. - */ - protected void init(BundleContext context) throws Exception { - // Get the bundle for this plug-in. - Bundle bundle = getBundle(); - - // Get the resouce bundle for this plug-in. - resourceBundle = Platform.getResourceBundle(bundle); - - // Get the ID for this plug-in. - pluginId = bundle.getSymbolicName(); - - if (isDebugging()) { - getLogger().logInfo("Initializing " + pluginId); //$NON-NLS-1$ - } - - // Get the install path of this plug-in. - installURL = bundle.getEntry("/"); //$NON-NLS-1$ - - try { - installPath = FileLocator.resolve(installURL).getPath(); - } catch (IOException e) { - installPath = Platform.getInstallLocation().getURL().getPath(); - } - - try { - iconURL = new URL(installURL, ICON_PATH); - } catch (IOException e) { - } - - String symbolicName = bundle.getSymbolicName(); - if (symbolicName != null) { - String key = symbolicName + "/profiling"; //$NON-NLS-1$ - String value = InternalPlatform.getDefault().getOption(key); - profiling = value == null ? false : value.equalsIgnoreCase("true"); //$NON-NLS-1$ - } - - if (isDebugging()) { - getLogger().logInfo( - "Initialized " + pluginId + ", installPath=" + installPath); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Returns the ID of this plug-in. - * - * @return The ID of this plug-in. - */ - public String getId() { - return pluginId; - } - - /** - * Returns the install URL of this plug-in. - * - * @param The - * install URL of this plug-in. - */ - public URL getInstallURL() { - return installURL; - } - - /** - * Returns the install path of this plug-in. - * - * @param The - * install path of this plug-in. - */ - public String getInstallPath() { - return installPath; - } - - /** - * Loads and returns the localized properties of a Java properties file. - *

- * - * @param path - * The properties file path relative to the plug-in root. - * @return A Properties object. - */ - public Properties getProperties(String path) throws IOException { - Properties props = new Properties(); - if (path == null) { - return props; - } - - String filePath = getLocalizedFile(path, true); - if (filePath != null) { - props.load(new FileInputStream(filePath)); - } - - return props; - } - - /** - * get the locale specific absolute file path name of the given file in the - * plugin. - * - * @param path - * The properties file path relative to the plug-in root. - * @return String the locale specific absolute file path name of the given - * file. - * @throws IOException - */ - public String getLocalizedFile(String path, boolean useDefault) - throws IOException { - String filePath = null; - String fileName = FileUtil.getFileName(path); - int index = path.lastIndexOf(fileName); - String pathName = path.substring(0, index); - - Locale locale = Locale.getDefault(); - - Bundle bundle = getBundle(); - Bundle[] bundles = Platform.getFragments(bundle); - if (bundles != null) { - for (int i = 0; i < bundles.length; i++) { - URL entry = bundles[i].getEntry(pathName); - if (entry != null) { - URL url = FileLocator.resolve(entry); - filePath = I18nUtil.getLocalizedFile(url.getPath() - + fileName, locale); - if (filePath != null) { - break; - } - } - } - } - - if (filePath == null) { - URL entry = bundle.getEntry(path); - if (entry != null) { - URL url = FileLocator.resolve(entry); - filePath = I18nUtil.getLocalizedFile(url.getPath(), locale); - if (filePath == null && useDefault) { - filePath = url.getPath(); - } - } - } - - return filePath; - } - - /** - * for the given path in the plugin, find the localized files form the nl - * fragemenets and copy the localized files to the destination folder - * - * @param path - * String a relative path to the plugin root. The files in this - * folder will be iterated and their localized files will be - * copied over - * @param toDir - * FIle the destination folder - * @param recursive - * boolean recurively looking for files int the specified folder - * @param useLocaleFileName - * boolean if true the locale specific file names will be used in - * the copied destination, otherwise, the locale specific file - * name will be renamed to the default one in the destination - * folder - * @throws IOException - */ - public void copyLocalizedFiles(String path, File toDir, boolean recursive, - boolean useLocaleFileName) throws IOException { - String pluginPath = getInstallPath(); - URI pluginUri = new File(pluginPath).toURI(); - URI pathUri = new File(pluginPath, path).toURI(); - - List files = new ArrayList(); - File f = new File(pluginPath, path); - FileUtil.getAllFiles(f, files, recursive); - - // for each file found in the specified folder, get the localized file - for (Iterator it = files.iterator(); it.hasNext();) { - URI srcUri = ((File) it.next()).toURI(); - - // get the relative path of the file to the plugin root, then find - // the localized file - String relPath = pluginUri.relativize(srcUri).getPath(); - - // only get the locale specific file, don't include the default one - String localizedFile = getLocalizedFile(relPath, false); - if (localizedFile == null) { - continue; - } - - // need to change the target file path to relative to the path - // instead of the plugin root - relPath = pathUri.relativize(srcUri).getPath(); - File srcFile = new File(localizedFile); - File targetFile = new File(toDir, relPath); - File targetParent = targetFile.getParentFile(); - - // copy the file to the desitination - // if useLocaleFileName is true, the destination file name should - // also use the locale specific file name - if (useLocaleFileName) { - String fileName = srcFile.getName(); - targetFile = new File(targetParent, fileName); - } - - if (isDebugging()) { - System.out.println("Copying localized file: "); //$NON-NLS-1$ - System.out.println("Source: " + srcFile); //$NON-NLS-1$ - System.out.println("Target: " + targetFile); //$NON-NLS-1$ - System.out.println(""); //$NON-NLS-1$ - } - - try { - if (!targetParent.exists()) { - targetParent.mkdirs(); - } - - if (!targetFile.exists()) { - targetFile.createNewFile(); - } - - FileUtil.copyFile(srcFile, targetFile); - } catch (IOException e) { - e.printStackTrace(); - } - } - - } - - /** - * Returns the localized resource. - * - * @param key - * The resource key. - * @return The localized resource. - */ - public String getString(String key) { - if (resourceBundle != null) { - try { - return resourceBundle.getString(key); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the formatted localized message given the resource key and the - * message argument. - * - * @param key - * The resource key. - * @param argument - * The message argument. - * @return The formatted localized message. - */ - public String formatMessage(String key, Object argument) { - if (resourceBundle != null) { - try { - String msg = resourceBundle.getString(key); - Object[] arguments = { argument }; - return MessageFormat.format(msg, arguments); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the image URL given the relative path. - * - * @param relativePath - * The image's path relative to the plug-in's root. - * @return The image URL. - */ - public URL getImageURL(String relativePath) { - try { - URL url = new URL(iconURL, relativePath); - return FileLocator.resolve(url); - } catch (Exception e) { - return null; - } - } - - /** - * Returns the image descriptor given the relative path. - * - * @param relativePath - * The image's path relative to the plug-in's root. - * @return The image descriptor. - */ - public ImageDescriptor getImageDescriptor(String relativePath) { - try { - URL url = new URL(iconURL, relativePath); - return ImageDescriptor.createFromURL(url); - } catch (MalformedURLException e) { - return ImageDescriptor.getMissingImageDescriptor(); - } - } - - /** - * Returns the image given the relative path. - *

- * Note: The returned image need to be freed by the caller. - * - * @param relativePath - * The image's path relative to the plug-in's root. - * @return The image. - */ - public Image getImage(String relativePath) { - Image image = null; - - ImageDescriptor imageDescriptor = getImageDescriptor(relativePath); - if (imageDescriptor != null) { - image = imageDescriptor.createImage(false); - } - - return image; - } - - /** - * Returns the shared image given the relative path. - *

- * Note: The returned image will be automatically freed when the plug-in - * shuts down. - * - * @param relativePath - * The image's path relative to the plug-in's root. - * @return The image. - */ - public Image getSharedImage(String relativePath) { - Image image = (Image) sharedImages.get(relativePath); - if (image != null) { - return image; - } - - ImageDescriptor imageDescriptor = getImageDescriptor(relativePath); - if (imageDescriptor != null) { - image = imageDescriptor.createImage(false); - if (image != null) { - sharedImages.put(relativePath, image); - } - } - - return image; - } - - /** - * Returns the profiling flag. - * - * @return true if profiling is enabled for this plu-in - */ - public boolean isProfiling() { - return profiling; - } - - /** - * Returns the logger given the plug-in ID. - * - * @return The new or cached logger. - */ - public Logger getLogger() { - Logger logger = (Logger) loggers.get(pluginId); - if (logger == null) { - logger = new Logger(this); - loggers.put(pluginId, logger); - } - return logger; - } - - /** - * Returns the message dialog given the plug-in ID. - * - * @return The new or cached message dialog. - */ - public static MsgDialog getMsgDialog(IActivator plugin) { - MsgDialog msgDialog = (MsgDialog) msgDialogs.get(plugin.getId()); - if (msgDialog == null) { - msgDialog = new MsgDialog(plugin); - msgDialogs.put(plugin.getId(), msgDialog); - } - return msgDialog; - } - - - public MsgDialog getMsgDialog() { - return getMsgDialog(this); - } - - /** - * Returns the standard display to be used. The method first checks, if the - * thread calling this method has an associated disaply. If so, this display - * is returned. Otherwise the method returns the default display. - */ - public static Display getStandardDisplay() { - Display display; - display = Display.getCurrent(); - if (display == null) - display = Display.getDefault(); - return display; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/CommonUIPlugin.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/CommonUIPlugin.java deleted file mode 100644 index 3681e7d3c58..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/CommonUIPlugin.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui; - -import org.eclipse.epf.common.CommonPlugin; -import org.eclipse.epf.common.IMessageCallback; -import org.eclipse.epf.common.ui.util.MsgBox; -import org.osgi.framework.BundleContext; - -public class CommonUIPlugin extends AbstractPlugin { - - // The shared plug-in instance. - private static CommonUIPlugin plugin; - - /** - * Creates a new instance. - */ - public CommonUIPlugin() { - super(); - plugin = this; - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - -// // set the preference store for the common plugin - PreferenceStoreWrapper storeWrapper = new PreferenceStoreWrapper(getPreferenceStore()); - CommonPlugin.getDefault().setCommonPreferenceStore(storeWrapper); - - // create the message callback context for the non-ui plugins - // this is the context for message callback - // for eclipse client, this is the Shell object - // shell object can't be shared acrooss thread, use a context provider instead - //CommonPlugin.getDefault().setContext(MsgBox.getDefaultShell()); - - CommonPlugin.getDefault().setContextProvider(new ContextProvider()); - - // create the MessageCallback to be accessible to the non-ui plugin - IMessageCallback msgCallback = new MessageCallback(); - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - super.stop(context); - plugin = null; - } - - /** - * Gets the shared instance. - * - * @return the shared plug-in instance - */ - public static CommonUIPlugin getDefault() { - return plugin; - } - - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/ContextProvider.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/ContextProvider.java deleted file mode 100644 index 7530e31cf0d..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/ContextProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui; - -import org.eclipse.epf.common.IContextProvider; -import org.eclipse.epf.common.ui.util.MsgBox; - -/** - * content provider for non-ui plugins - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public class ContextProvider implements IContextProvider { - - public Object getContext() { - //TODO: revisit - Object ctx = null; - try { - ctx = CommonUIPlugin.getDefault().getWorkbench().getDisplay().getActiveShell(); - } - catch(Exception e) { - // - } - return ctx != null ? ctx : MsgBox.getDefaultShell(); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/MessageCallback.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/MessageCallback.java deleted file mode 100644 index dfef39b6621..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/MessageCallback.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui; - -import org.eclipse.epf.common.AbstractActivator; -import org.eclipse.epf.common.IMessageCallback; -import org.eclipse.epf.common.ui.util.MsgDialog; - -/** - * message callback implementation - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public class MessageCallback implements IMessageCallback { - - public void displayWarning(AbstractActivator plugin, String title, String msg, String reason) { - displayWarning(plugin, title, msg, reason, null, null); - } - - public void displayWarning(AbstractActivator plugin, String msg, String reason, Throwable ex) { - displayWarning(plugin, msg, reason, null, ex); - } - - public void displayWarning(AbstractActivator plugin, String msg, String reason, - String details, Throwable ex) { - String title = CommonUIPlugin.getDefault().getWorkbench().getDisplay().getActiveShell().getText(); - displayWarning(plugin, title, msg, reason, details, ex); - } - - public void displayWarning(AbstractActivator plugin, String title, String msg, String reason, - String details, Throwable ex) { - MsgDialog dlg = CommonUIPlugin.getDefault().getMsgDialog(plugin); - dlg.displayWarning(title, msg, reason, details, ex); - } - - public void displayError(AbstractActivator plugin, String title, String msg) { - displayError(plugin, title, msg, null, null, null); - } - - public void displayError(AbstractActivator plugin, String title, String msg, Throwable ex) { - displayError(plugin, title, msg, null, null, ex); - } - public void displayError(AbstractActivator plugin, String title, String msg, String reason, String details, Throwable ex) { - MsgDialog dlg = CommonUIPlugin.getDefault().getMsgDialog(plugin); - dlg.displayError(title, msg, reason, details, ex); - - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PreferenceStoreWrapper.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PreferenceStoreWrapper.java deleted file mode 100644 index 534f8af084b..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PreferenceStoreWrapper.java +++ /dev/null @@ -1,532 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.epf.common.preferences.IPreferenceStoreWrapper; -import org.eclipse.epf.common.preferences.IPropertyChangeListenerWrapper; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; - -/** - * wrapper class for preference store - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public class PreferenceStoreWrapper implements IPreferenceStoreWrapper { - private IPreferenceStore store; - public PreferenceStoreWrapper(IPreferenceStore store) { - this.store = store; - } - - Map listenerMap = new HashMap(); - - public IPreferenceStore getStore() { - return store; - } - - public void addPropertyChangeListener(final IPropertyChangeListenerWrapper listener) { - // create a PropertyChangeListener and add to the store - IPropertyChangeListener pcl = new IPropertyChangeListener(){ - - public void propertyChange(PropertyChangeEvent event) { - PropertyChangeEventWrapper wrapper = new PropertyChangeEventWrapper(event); - listener.propertyChange(wrapper); - - }}; - - listenerMap.put(listener, pcl); - store.addPropertyChangeListener(pcl); - } - - public void firePropertyChangeEvent(String name, Object oldValue, - Object newValue) { - store.firePropertyChangeEvent(name, oldValue, newValue); - } - - public void removePropertyChangeListener(IPropertyChangeListenerWrapper listener) { - IPropertyChangeListener pcl = listenerMap.remove(listener); - if ( pcl != null ) { - store.removePropertyChangeListener(pcl); - } - } - - /** - * Returns the current value of the boolean-valued preference with the - * given name. - * Returns the default-default value (false) if there - * is no preference with the given name, or if the current value - * cannot be treated as a boolean. - * - * @param name the name of the preference - * @return the boolean-valued preference - */ - public boolean getBoolean(String name) { - return store.getBoolean(name); - } - - /** - * Returns the default value for the boolean-valued preference - * with the given name. - * Returns the default-default value (false) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a boolean. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public boolean getDefaultBoolean(String name) { - return store.getDefaultBoolean(name); - } - - /** - * Returns the default value for the double-valued preference - * with the given name. - * Returns the default-default value (0.0) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a double. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public double getDefaultDouble(String name) { - return store.getDefaultDouble(name); - } - - /** - * Returns the default value for the float-valued preference - * with the given name. - * Returns the default-default value (0.0f) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a float. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public float getDefaultFloat(String name) { - return store.getDefaultFloat(name); - } - - /** - * Returns the default value for the integer-valued preference - * with the given name. - * Returns the default-default value (0) if there - * is no default preference with the given name, or if the default - * value cannot be treated as an integer. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public int getDefaultInt(String name) { - return store.getDefaultInt(name); - } - - /** - * Returns the default value for the long-valued preference - * with the given name. - * Returns the default-default value (0L) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a long. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public long getDefaultLong(String name) { - return store.getDefaultLong(name); - } - - /** - * Returns the default value for the string-valued preference - * with the given name. - * Returns the default-default value (the empty string "") - * is no default preference with the given name, or if the default - * value cannot be treated as a string. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public String getDefaultString(String name) { - return store.getDefaultString(name); - } - - /** - * Returns the current value of the double-valued preference with the - * given name. - * Returns the default-default value (0.0) if there - * is no preference with the given name, or if the current value - * cannot be treated as a double. - * - * @param name the name of the preference - * @return the double-valued preference - */ - public double getDouble(String name) { - return store.getDouble(name); - } - - /** - * Returns the current value of the float-valued preference with the - * given name. - * Returns the default-default value (0.0f) if there - * is no preference with the given name, or if the current value - * cannot be treated as a float. - * - * @param name the name of the preference - * @return the float-valued preference - */ - public float getFloat(String name) { - return store.getFloat(name); - } - - /** - * Returns the current value of the integer-valued preference with the - * given name. - * Returns the default-default value (0) if there - * is no preference with the given name, or if the current value - * cannot be treated as an integter. - * - * @param name the name of the preference - * @return the int-valued preference - */ - public int getInt(String name) { - return store.getInt(name); - } - - /** - * Returns the current value of the long-valued preference with the - * given name. - * Returns the default-default value (0L) if there - * is no preference with the given name, or if the current value - * cannot be treated as a long. - * - * @param name the name of the preference - * @return the long-valued preference - */ - public long getLong(String name) { - return store.getLong(name); - } - - /** - * Returns the current value of the string-valued preference with the - * given name. - * Returns the default-default value (the empty string "") - * if there is no preference with the given name, or if the current value - * cannot be treated as a string. - * - * @param name the name of the preference - * @return the string-valued preference - */ - public String getString(String name) { - return store.getString(name); - } - - /** - * Returns whether the current value of the preference with the given name - * has the default value. - * - * @param name the name of the preference - * @return true if the preference has a known default value - * and its current value is the same, and false otherwise - * (including the case where the preference is unknown to this store) - */ - public boolean isDefault(String name) { - return store.isDefault(name); - } - - /** - * Returns whether the current values in this property store - * require saving. - * - * @return true if at least one of values of - * the preferences known to this store has changed and - * requires saving, and false otherwise. - */ - public boolean needsSaving() { - return store.needsSaving(); - } - - /** - * Sets the current value of the preference with the given name to - * the given string value without sending a property change. - *

- * This method does not fire a property change event and - * should only be used for setting internal preferences - * that are not meant to be processed by listeners. - * Normal clients should instead call #setValue. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void putValue(String name, String value) { - store.putValue(name, value); - } - - /** - * Sets the default value for the double-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, double value) { - store.setDefault(name, value); - } - - /** - * Sets the default value for the float-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, float value) { - store.setDefault(name, value); - } - - /** - * Sets the default value for the integer-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, int value) { - store.setDefault(name, value); - } - - /** - * Sets the default value for the long-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, long value) { - store.setDefault(name, value); - } - - /** - * Sets the default value for the string-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param defaultObject the new default value for the preference - */ - public void setDefault(String name, String defaultObject) { - store.setDefault(name, defaultObject); - } - - /** - * Sets the default value for the boolean-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, boolean value) { - store.setDefault(name, value); - } - - /** - * Sets the current value of the preference with the given name back - * to its default value. - *

- * Note that the preferred way of re-initializing a preference to the - * appropriate default value is to call setToDefault. - * This is implemented by removing the named value from the store, - * thereby exposing the default value. - *

- * - * @param name the name of the preference - */ - public void setToDefault(String name) { - store.setToDefault(name); - } - - /** - * Sets the current value of the double-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, double value) { - store.setValue(name, value); - } - - /** - * Sets the current value of the float-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, float value) { - store.setValue(name, value); - } - - /** - * Sets the current value of the integer-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, int value) { - store.setValue(name, value); - } - - /** - * Sets the current value of the long-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, long value) { - store.setValue(name, value); - } - - /** - * Sets the current value of the string-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, String value) { - store.setValue(name, value); - } - - /** - * Sets the current value of the boolean-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, boolean value) { - store.setValue(name, value); - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PropertyChangeEventWrapper.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PropertyChangeEventWrapper.java deleted file mode 100644 index 2d3a7717757..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/PropertyChangeEventWrapper.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui; - -import org.eclipse.epf.common.preferences.IPropertyChangeEventWrapper; -import org.eclipse.jface.util.PropertyChangeEvent; - -/** - * wrapper class for property change event - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public class PropertyChangeEventWrapper implements IPropertyChangeEventWrapper { - - private PropertyChangeEvent event; - public PropertyChangeEventWrapper(PropertyChangeEvent event) { - this.event = event; - } - - /** - * Returns the new value of the property. - * - * @return the new value, or null if not known - * or not relevant (for instance if the property was removed). - */ - public Object getNewValue() { - return this.event.getNewValue(); - } - - /** - * Returns the old value of the property. - * - * @return the old value, or null if not known - * or not relevant (for instance if the property was just - * added and there was no old value). - */ - public Object getOldValue() { - return this.event.getOldValue(); - } - - /** - * Returns the name of the property that changed. - *

- * Warning: there is no guarantee that the property name returned - * is a constant string. Callers must compare property names using - * equals, not ==. - *

- * - * @return the name of the property that changed - */ - public String getProperty() { - return this.event.getProperty(); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/actions/CComboContributionItem.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/actions/CComboContributionItem.java deleted file mode 100644 index 1858e7f8bb6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/actions/CComboContributionItem.java +++ /dev/null @@ -1,164 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.actions; - -import java.util.Collection; - -import org.eclipse.jface.action.ContributionItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CCombo; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.CoolBar; -import org.eclipse.swt.widgets.CoolItem; -import org.eclipse.swt.widgets.ToolBar; -import org.eclipse.swt.widgets.ToolItem; - -/** - * Wraps a CCombo in a ContributionItem for use in a toolbar - * - * Does not use a ComboViewer because of tabbing issues - see bug 78885 - * @author Jeff Hardy - * - */ -public class CComboContributionItem extends ContributionItem { - - protected CCombo CCombo; - - protected ToolItem toolItem; - - protected CoolItem coolItem; - - protected int style; - - protected Collection input; - - /** - * Creates a new instance. - */ - public CComboContributionItem(int style) { - super(); - this.style = style; - } - - /* - * @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.ToolBar, - * int) - */ - public void fill(ToolBar parent, int index) { - toolItem = new ToolItem(parent, SWT.SEPARATOR); - Control box = createControl(parent); - toolItem.setControl(box); - Point preferredSize = CCombo.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); - toolItem.setWidth(preferredSize.x); - } - - /* - * @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.CoolBar, - * int) - */ - public void fill(CoolBar coolBar, int index) { - Control box = createControl(coolBar); - - if (index >= 0) { - coolItem = new CoolItem(coolBar, SWT.DROP_DOWN, index); - } else { - coolItem = new CoolItem(coolBar, SWT.DROP_DOWN); - } - - // Set the back reference. - coolItem.setData(this); - - // Add the toolbar to the CoolItem widget. - coolItem.setControl(box); - - // If the toolbar item exists then adjust the size of the cool item. - Point toolBarSize = box.computeSize(SWT.DEFAULT, SWT.DEFAULT); - - // Set the preferred size to the size of the toolbar plus trim. - coolItem.setMinimumSize(toolBarSize); - coolItem.setPreferredSize(toolBarSize); - coolItem.setSize(toolBarSize); - } - - /* - * @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Composite) - */ - public void fill(Composite parent) { - createControl(parent); - } - - /** - * Creates the control. - */ - protected Control createControl(final Composite parent) { - CCombo = new CCombo(parent, style); - CCombo.setVisibleItemCount(10); - CCombo.setEnabled(true); - CCombo.setItems(input.toArray(new String[0])); - CCombo.addDisposeListener( - new DisposeListener() { - public void widgetDisposed(DisposeEvent event) { - dispose(); - } - }); - - CCombo.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) { - } - - public void widgetSelected(SelectionEvent e) { - performSelectionChanged(); - } - }); - - return CCombo; - } - - /** - * Returns the currently selected method configuration - */ - protected int getSelectionIndex() { - return CCombo.getSelectionIndex(); - } - - protected void setInput(Collection input) { - this.input = input; - } - - - protected void performSelectionChanged() { - } - - /* - * @see org.eclipse.jface.action.ContributionItem#dispose() - */ - public void dispose() { - super.dispose(); - } - - public CCombo getCCombo() { - return CCombo; - } - - public ToolItem getToolItem() { - return toolItem; - } - - public CoolItem getCoolItem() { - return coolItem; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ClipboardUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ClipboardUtil.java deleted file mode 100644 index 6fc767b6db4..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ClipboardUtil.java +++ /dev/null @@ -1,122 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import java.net.MalformedURLException; -import java.net.URL; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.swt.SWT; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.dnd.HTMLTransfer; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.widgets.Display; -import org.osgi.framework.Bundle; - -/** - * Utility class for retrieving data from the clipboard. - * - * @author Kelvin Low - * @since 1.0 - */ -public class ClipboardUtil { - - /** - * The current clipboard. - */ - private static Clipboard clipboard; - - private static final String SOURCE_URL = "SourceURL:"; //$NON-NLS-1$ - - private static Transfer htmlTransfer = null; - - static { - if (SWT.getPlatform().equals("win32")) { //$NON-NLS-1$ - try { - boolean is64bit = (System.getProperty("os.arch").indexOf("64") != -1); - Bundle bundle = null; - if (is64bit) { - bundle = Platform - .getBundle("org.eclipse.epf.common.win32.win32.x86_64"); //$NON-NLS-1$ - } else { - bundle = Platform - .getBundle("org.eclipse.epf.common.win32.win32.x86"); //$NON-NLS-1$ - } - if (bundle != null) { - Class c = bundle - .loadClass("org.eclipse.epf.common.win32.Win32HTMLTransfer"); //$NON-NLS-1$ - if (c != null) { - htmlTransfer = (Transfer) c.newInstance(); - } - } - } catch (Exception e) { - htmlTransfer = null; - } - } - } - - /** - * Gets the HTML source URL from the current clipboard. - * - * @return the HTML source URL or null - */ - public static String getHTMLSourceURL() { - if (htmlTransfer == null) { - return null; - } - - Clipboard clipboard = new Clipboard(Display.getCurrent()); - String sourceURL = null; - try { - String htmlContent = (String) clipboard.getContents(htmlTransfer); - if (htmlContent != null && htmlContent.length() > 0) { - int index = htmlContent.indexOf(SOURCE_URL); - if (index > 0) { - sourceURL = htmlContent.substring(index - + SOURCE_URL.length()); - sourceURL = sourceURL.substring(0, sourceURL - .indexOf(FileUtil.LINE_SEP)); - } - } - if (sourceURL != null && sourceURL.indexOf("\\") != -1) { //$NON-NLS-1$ - // IE provides sourceURL in form "file://C:\foo\bar.htm" - // but when the hrefs are resolved, files look like "file:///C:/foo/bar.htm" - URL url = new URL(sourceURL); - sourceURL = url.toExternalForm(); - if (sourceURL.startsWith("file://") && !sourceURL.startsWith("file:///")) { //$NON-NLS-1$ //$NON-NLS-2$ - // need to add a third / so rte.js can match the sourceURL to hrefs - sourceURL = "file:///" + sourceURL.substring(7); //$NON-NLS-1$ - } - } - return sourceURL; - } catch (MalformedURLException urlEx) { - return sourceURL; - } finally { - clipboard.dispose(); - } - } - - /** - * Copy the string to the clipboard. - */ - public static void copyTextHTMLToClipboard(String string) { - if (clipboard != null) - clipboard.dispose(); - clipboard = new Clipboard(null); - clipboard.setContents(new Object[] { string, string }, - new Transfer[] { TextTransfer.getInstance(), HTMLTransfer.getInstance() }); - if (clipboard != null) - clipboard.dispose(); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/CommonPreferences.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/CommonPreferences.java deleted file mode 100644 index d20685d3365..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/CommonPreferences.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.epf.common.ui.CommonUIPlugin; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * Manages the common preferences. - * - * @author Kelvin Low - * @since 1.2 - */ -public class CommonPreferences { - - /** - * Preference key for storing the preference history size. - */ - private static final String PREFERENCE_HISTORY_SIZE = "preferenceHistorySize"; //$NON-NLS-1$ - - // The plug-in specific preference store. - private static IPreferenceStore prefStore = CommonUIPlugin.getDefault() - .getPreferenceStore(); - - static { - // Initialize the default preference values. - prefStore.setDefault(PREFERENCE_HISTORY_SIZE, - getDefaultPreferenceHistorySize()); - } - - /** - * Gets the default preference history size. - */ - public static int getDefaultPreferenceHistorySize() { - return 10; - } - - /** - * Gets the preference history size. - */ - public static int getPreferenceHistorySize() { - return prefStore.getInt(PREFERENCE_HISTORY_SIZE); - } - - /** - * Saves the preference history size. - */ - public static void setPreferenceHistorySize(int value) { - prefStore.setValue(PREFERENCE_HISTORY_SIZE, value); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ErrorDialogNoReason.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ErrorDialogNoReason.java deleted file mode 100644 index 6793260c080..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/ErrorDialogNoReason.java +++ /dev/null @@ -1,598 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.IconAndMessageDialog; -import org.eclipse.jface.resource.JFaceResources; -import org.eclipse.swt.SWT; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.List; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.MenuItem; -import org.eclipse.swt.widgets.Shell; - -/** - * Displays an error dialog without the Details button. - * - * @author Bingxue Xu - * @since 1.0 - */ -public class ErrorDialogNoReason extends IconAndMessageDialog { - - /** - * Static to prevent opening of error dialogs for automated testing. - */ - public static final boolean AUTOMATED_MODE = false; - - /** - * Reserve room for this many list items. - */ - private static final int LIST_ITEM_COUNT = 7; - - /** - * The nesting indent. - */ - private static final String NESTING_INDENT = " "; //$NON-NLS-1$ - - /** - * The Details button. - */ - protected Button detailsButton; - - /** - * The title of the dialog. - */ - private String title; - - /** - * The SWT list control that displays the error details. - */ - private List list; - - /** - * Indicates whether the error details viewer is currently created. - */ - private boolean listCreated = false; - - /** - * Filter mask for determining which status items to display. - */ - private int displayMask = 0xFFFF; - - /** - * The main status object. - */ - private IStatus status; - - /** - * The current clipboard. To be disposed when closing the dialog. - */ - private Clipboard clipboard; - - private boolean shouldIncludeTopLevelErrorInDetails = false; - - /** - * Creates an error dialog. Note that the dialog will have no visual - * representation (no widgets) until it is told to open. - *

- * Normally one should use openError to create and open one - * of these. This constructor is useful only if the error object being - * displayed contains child items and you need to specify a mask - * which will be used to filter the displaying of these children. - *

- * - * @param parentShell - * the shell under which to create this dialog - * @param dialogTitle - * the title to use for this dialog, or null to - * indicate that the default title should be used - * @param message - * the message to show in this dialog, or null to - * indicate that the error's message should be shown as the - * primary message - * @param status - * the error to show to the user - * @param displayMask - * the mask to use to filter the displaying of child items, as - * per IStatus.matches - * @see org.eclipse.core.runtime.IStatus#matches(int) - */ - public ErrorDialogNoReason(Shell parentShell, String dialogTitle, - String message, IStatus status, int displayMask) { - super(parentShell); - this.title = dialogTitle == null ? JFaceResources - .getString("Problem_Occurred") : //$NON-NLS-1$ - dialogTitle; - this.message = message == null ? status.getMessage() : message; - this.status = status; - this.displayMask = displayMask; - setShellStyle(getShellStyle() | SWT.RESIZE); - } - - /* - * (non-Javadoc) Method declared on Dialog. Handles the pressing of the Ok - * or Details button in this dialog. If the Ok button was pressed then close - * this dialog. If the Details button was pressed then toggle the displaying - * of the error details area. Note that the Details button will only be - * visible if the error being displayed specifies child details. - */ - protected void buttonPressed(int id) { - if (id == IDialogConstants.DETAILS_ID) { - // was the details button pressed? - toggleDetailsArea(); - } else { - super.buttonPressed(id); - } - } - - /* - * (non-Javadoc) Method declared in Window. - */ - protected void configureShell(Shell shell) { - super.configureShell(shell); - shell.setText(title); - } - - /* - * (non-Javadoc) Method declared on Dialog. - */ - protected void createButtonsForButtonBar(Composite parent) { - // create OK and Details buttons - createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, - true); - createButton(parent, IDialogConstants.CANCEL_ID, - IDialogConstants.CANCEL_LABEL, false); - if (shouldShowDetailsButton()) { - detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, - IDialogConstants.SHOW_DETAILS_LABEL, false); - } - } - - /** - * This implementation of the Dialog framework method creates - * and lays out a composite and calls createMessageArea and - * createCustomArea to populate it. Subclasses should - * override createCustomArea to add contents below the - * message. - */ - protected Control createDialogArea(Composite parent) { - createMessageArea(parent); - // create a composite with standard margins and spacing - Composite composite = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); - layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); - layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); - layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); - layout.numColumns = 2; - composite.setLayout(layout); - GridData childData = new GridData(GridData.FILL_BOTH); - childData.horizontalSpan = 2; - composite.setLayoutData(childData); - composite.setFont(parent.getFont()); - return composite; - } - - /* - * @see IconAndMessageDialog#createDialogAndButtonArea(Composite) - */ - protected void createDialogAndButtonArea(Composite parent) { - super.createDialogAndButtonArea(parent); - if (this.dialogArea instanceof Composite) { - // Create a label if there are no children to force a smaller layout - Composite dialogComposite = (Composite) dialogArea; - if (dialogComposite.getChildren().length == 0) - new Label(dialogComposite, SWT.NULL); - } - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.dialogs.IconAndMessageDialog#getImage() - */ - protected Image getImage() { - if (status != null) { - if (status.getSeverity() == IStatus.WARNING) - return getWarningImage(); - if (status.getSeverity() == IStatus.INFO) - return getInfoImage(); - } - // If it was not a warning or an error then return the error image - return getErrorImage(); - } - - /** - * Create this dialog's drop-down list component. - * - * @param parent - * the parent composite - * @return the drop-down list component - */ - protected List createDropDownList(Composite parent) { - // create the list - list = new List(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL - | SWT.MULTI); - // fill the list - populateList(list); - GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL - | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL - | GridData.GRAB_VERTICAL); - data.heightHint = list.getItemHeight() * LIST_ITEM_COUNT; - data.horizontalSpan = 2; - list.setLayoutData(data); - list.setFont(parent.getFont()); - Menu copyMenu = new Menu(list); - MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE); - copyItem.addSelectionListener(new SelectionListener() { - /* - * @see SelectionListener.widgetSelected (SelectionEvent) - */ - public void widgetSelected(SelectionEvent e) { - copyToClipboard(); - } - - /* - * @see SelectionListener.widgetDefaultSelected(SelectionEvent) - */ - public void widgetDefaultSelected(SelectionEvent e) { - copyToClipboard(); - } - }); - copyItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$ - list.setMenu(copyMenu); - listCreated = true; - return list; - } - - /* - * (non-Javadoc) Method declared on Window. - */ - /** - * Extends Window.open(). Opens an error dialog to display - * the error. If you specified a mask to filter the displaying of these - * children, the error dialog will only be displayed if there is at least - * one child status matching the mask. - */ - public int open() { - if (!AUTOMATED_MODE && shouldDisplay(status, displayMask)) { - return super.open(); - } - setReturnCode(OK); - return OK; - } - - /** - * Opens an error dialog to display the given error. Use this method if the - * error object being displayed does not contain child items, or if you wish - * to display all such items without filtering. - * - * @param parent - * the parent shell of the dialog, or null if none - * @param dialogTitle - * the title to use for this dialog, or null to - * indicate that the default title should be used - * @param message - * the message to show in this dialog, or null to - * indicate that the error's message should be shown as the - * primary message - * @param status - * the error to show to the user - * @return the code of the button that was pressed that resulted in this - * dialog closing. This will be Dialog.OK if the OK - * button was pressed, or Dialog.CANCEL if this - * dialog's close window decoration or the ESC key was used. - */ - public static int openError(Shell parent, String dialogTitle, - String message, IStatus status) { - return openError(parent, dialogTitle, message, status, IStatus.OK - | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); - } - - /** - * Opens an error dialog to display the given error. Use this method if the - * error object being displayed contains child items and you wish - * to specify a mask which will be used to filter the displaying of these - * children. The error dialog will only be displayed if there is at least - * one child status matching the mask. - * - * @param parentShell - * the parent shell of the dialog, or null if none - * @param title - * the title to use for this dialog, or null to - * indicate that the default title should be used - * @param message - * the message to show in this dialog, or null to - * indicate that the error's message should be shown as the - * primary message - * @param status - * the error to show to the user - * @param displayMask - * the mask to use to filter the displaying of child items, as - * per IStatus.matches - * @return the code of the button that was pressed that resulted in this - * dialog closing. This will be Dialog.OK if the OK - * button was pressed, or Dialog.CANCEL if this - * dialog's close window decoration or the ESC key was used. - * @see org.eclipse.core.runtime.IStatus#matches(int) - */ - public static int openError(Shell parentShell, String title, - String message, IStatus status, int displayMask) { - ErrorDialogNoReason dialog = new ErrorDialogNoReason(parentShell, - title, message, status, displayMask); - return dialog.open(); - } - - /** - * Populates the list using this error dialog's status object. This walks - * the child static of the status object and displays them in a list. The - * format for each entry is status_path : status_message If the status's - * path was null then it (and the colon) are omitted. - * - * @param listToPopulate - * The list to fill. - */ - private void populateList(List listToPopulate) { - populateList(listToPopulate, status, 0, - shouldIncludeTopLevelErrorInDetails); - } - - /** - * Populate the list with the messages from the given status. Traverse the - * children of the status deeply and also traverse CoreExceptions that - * appear in the status. - * - * @param listToPopulate - * the list to populate - * @param buildingStatus - * the status being displayed - * @param nesting - * the nesting level (increases one level for each level of - * children) - * @param includeStatus - * whether to include the buildingStatus in the display or just - * its children - */ - private void populateList(List listToPopulate, IStatus buildingStatus, - int nesting, boolean includeStatus) { - - if (!buildingStatus.matches(displayMask)) { - return; - } - - Throwable t = buildingStatus.getException(); - boolean isCoreException = t instanceof CoreException; - boolean incrementNesting = false; - - if (includeStatus) { - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < nesting; i++) { - sb.append(NESTING_INDENT); - } - String message = buildingStatus.getMessage(); - sb.append(message); - listToPopulate.add(sb.toString()); - incrementNesting = true; - } - - if (!isCoreException && t != null) { - // Include low-level exception message - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < nesting; i++) { - sb.append(NESTING_INDENT); - } - String message = t.getLocalizedMessage(); - if (message == null) - message = t.toString(); - - sb.append(message); - listToPopulate.add(sb.toString()); - incrementNesting = true; - } - - if (incrementNesting) - nesting++; - - // Look for a nested core exception - if (isCoreException) { - CoreException ce = (CoreException) t; - IStatus eStatus = ce.getStatus(); - // Only print the exception message if it is not contained in the - // parent message - if (message == null || message.indexOf(eStatus.getMessage()) == -1) { - populateList(listToPopulate, eStatus, nesting, true); - } - } - - // Look for child status - IStatus[] children = buildingStatus.getChildren(); - for (int i = 0; i < children.length; i++) { - populateList(listToPopulate, children[i], nesting, true); - } - } - - /** - * Returns whether the given status object should be displayed. - * - * @param status - * a status object - * @param mask - * a mask as per IStatus.matches - * @return true if the given status should be displayed, and - * false otherwise - * @see org.eclipse.core.runtime.IStatus#matches(int) - */ - protected static boolean shouldDisplay(IStatus status, int mask) { - IStatus[] children = status.getChildren(); - if (children == null || children.length == 0) { - return status.matches(mask); - } - for (int i = 0; i < children.length; i++) { - if (children[i].matches(mask)) - return true; - } - return false; - } - - /** - * Toggles the unfolding of the details area. This is triggered by the user - * pressing the details button. - */ - private void toggleDetailsArea() { - Point windowSize = getShell().getSize(); - Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); - if (listCreated) { - list.dispose(); - listCreated = false; - detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); - } else { - list = createDropDownList((Composite) getContents()); - detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); - } - Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); - getShell() - .setSize( - new Point(windowSize.x, windowSize.y - + (newSize.y - oldSize.y))); - } - - /** - * Put the details of the status of the error onto the stream. - * - * @param buildingStatus - * @param buffer - * @param nesting - */ - private void populateCopyBuffer(IStatus buildingStatus, - StringBuffer buffer, int nesting) { - if (!buildingStatus.matches(displayMask)) { - return; - } - for (int i = 0; i < nesting; i++) { - buffer.append(NESTING_INDENT); - } - buffer.append(buildingStatus.getMessage()); - buffer.append("\n"); //$NON-NLS-1$ - - // Look for a nested core exception - Throwable t = buildingStatus.getException(); - if (t instanceof CoreException) { - CoreException ce = (CoreException) t; - populateCopyBuffer(ce.getStatus(), buffer, nesting + 1); - } - - IStatus[] children = buildingStatus.getChildren(); - for (int i = 0; i < children.length; i++) { - populateCopyBuffer(children[i], buffer, nesting + 1); - } - } - - /** - * Copy the contents of the statuses to the clipboard. - */ - private void copyToClipboard() { - if (clipboard != null) - clipboard.dispose(); - StringBuffer statusBuffer = new StringBuffer(); - populateCopyBuffer(status, statusBuffer, 0); - clipboard = new Clipboard(list.getDisplay()); - clipboard.setContents(new Object[] { statusBuffer.toString() }, - new Transfer[] { TextTransfer.getInstance() }); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.window.Window#close() - */ - public boolean close() { - if (clipboard != null) - clipboard.dispose(); - return super.close(); - } - - /** - * Show the details portion of the dialog if it is not already visible. This - * method will only work when it is invoked after the control of the dialog - * has been set. In other words, after the createContents - * method has been invoked and has returned the control for the content area - * of the dialog. Invoking the method before the content area has been set - * or after the dialog has been disposed will have no effect. - * - * @since 3.1 - */ - protected final void showDetailsArea() { - if (!listCreated) { - Control control = getContents(); - if (control != null && !control.isDisposed()) - toggleDetailsArea(); - } - } - - /** - * Return whether the Details button should be included. This method is - * invoked once when the dialog is built. By default, the Details button is - * only included if the status used when creating the dialog was a - * multi-status or if the status contains an exception. Subclasses may - * override. - * - * @return whether the Details button should be included - * @since 3.1 - */ - protected boolean shouldShowDetailsButton() { - return status.isMultiStatus() || status.getException() != null; - } - - /** - * Set the status displayed by this error dialog to the given status. This - * only affects the status displayed by the Details list. The message, image - * and title should be updated by the subclass, if desired. - * - * @param status - * the status to be displayed in the details list - * @since 3.1 - */ - protected final void setStatus(IStatus status) { - if (this.status != status) { - this.status = status; - } - shouldIncludeTopLevelErrorInDetails = true; - if (listCreated) { - repopulateList(); - } - } - - /** - * Repopulate the supplied list widget. - */ - private void repopulateList() { - if (list != null && !list.isDisposed()) { - list.removeAll(); - populateList(list); - } - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MenuUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MenuUtil.java deleted file mode 100644 index 52a828d1e80..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MenuUtil.java +++ /dev/null @@ -1,47 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.swt.widgets.MenuItem; - -/** - * A helper class for retrieving Eclipse menus. - * - * @author Kelvin Low - * @since 1.0 - */ -public class MenuUtil { - - /** - * Searches an array of menu items and returns the menu item that matches - * the given menu text. - * - * @param menuItems - * An array of menu items. - * @param text - * The text to look for. - * @return The menu item if found, null otherwise. - */ - public static MenuItem getMenuItem(MenuItem[] menuItems, String text) { - if (menuItems == null || text == null || text.length() == 0) { - return null; - } - - for (int i = 0; i < menuItems.length; i++) { - if (menuItems[i].getText().startsWith(text)) { - return menuItems[i]; - } - } - - return null; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgBox.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgBox.java deleted file mode 100644 index 1d97b41167a..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgBox.java +++ /dev/null @@ -1,123 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Shell; - -/** - * Helper class to display a message box. - * - * @author Phong Nguyen Le - * @author Kelvin Low - * @since 1.0 - */ -public final class MsgBox { - /** - * Use this method to show error message if you don't want long path to be - * cut off. - * - * @param msg - */ - public static final void nativeShowError(Shell shell, String msg) { - if (shell == null) { - shell = getDefaultShell(); - if (shell == null) { - return; - } - } - MessageBox msgBox = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR); - msgBox.setMessage(msg); - msgBox.setText(shell.getText()); - msgBox.open(); - } - - public static final void showError(String msg) { - showError(getDefaultShell(), msg); - } - - public static final void showError(Shell shell, String msg) { - WrappedMessageDialog.openError(shell, shell == null ? null : shell - .getText(), msg); - } - - public static final void showWarning(String msg) { - showWarning(getDefaultShell(), msg); - } - - public static final void showWarning(Shell shell, String msg) { - WrappedMessageDialog.openWarning(shell, shell == null ? null : shell - .getText(), msg); - } - - public static final Shell getDefaultShell() { - try { - Display d = Display.getCurrent(); - if (d == null) { - d = Display.getDefault(); - } - - Shell s = null; - if (d != null) { - s = d.getActiveShell(); - } - - return s; - } catch (RuntimeException e) { - return null; - } - } - - public static final Display getDisplay() { - try { - Display d = Display.getCurrent(); - if (d == null) { - d = Display.getDefault(); - } - - return d; - } catch (RuntimeException e) { - return null; - } - } - - public static final int prompt(String msg) { - return prompt(getDefaultShell(), msg); - } - - public static final int prompt(Shell shell, String msg) { - return prompt(shell, null, msg, SWT.YES | SWT.NO | SWT.CANCEL); - } - - public static final int prompt(String msg, int buttons) { - return prompt(getDefaultShell(), null, msg, buttons); - } - - public static final int prompt(String title, String msg, int buttons) { - return prompt(getDefaultShell(), title, msg, buttons); - } - - public static final int prompt(Shell shell, String msg, int buttons) { - return prompt(shell, null, msg, buttons); - } - - public static final int prompt(Shell shell, String title, String msg, - int buttons) { - MessageBox msgBox = new MessageBox(shell, buttons | SWT.ICON_QUESTION); - msgBox.setText(title != null && title.length() > 0 ? title : shell - .getText()); - msgBox.setMessage(msg); - return msgBox.open(); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgDialog.java deleted file mode 100644 index e681d33a19d..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/MsgDialog.java +++ /dev/null @@ -1,626 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.MultiStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.epf.common.IActivator; -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -/** - * A message dialog used for displaying error, warning, confirmation or - * informational messages. - * - * @author Kelvin Low - * @author Jinhua Xi - * @author Phong Nguyen Le - * @since 1.0 - */ -public class MsgDialog { - - // The plug-in ID. - private String pluginId; - - // The plug-in logger. - private Logger logger; - - /** - * Create a new instance given the plug-in instance. - * - * @param plugin - * The plugin instance. - */ - public MsgDialog(IActivator plugin) { - this.pluginId = plugin.getId(); - this.logger = plugin.getLogger(); - } - - protected Shell getShell() { - return PlatformUI.getWorkbench().getDisplay().getActiveShell(); - } - - /** - * Displays the given error message in an error dialog without the error - * reason and Details button. - *

- * Note: The error message will be written to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - */ - public void displayError(String title, String msg) { - display(IStatus.ERROR, title, msg, null, null, null); - } - - /** - * Displays the given error message in an error dialog without the error - * reason and Details button. - *

- * Note: The error message and the exception stack trace will be written to - * the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param ex - * The exception associated with the error. - */ - public void displayError(String title, String msg, Throwable ex) { - display(IStatus.ERROR, title, msg, null, null, ex); - } - - /** - * Displays the given error message in an error dialog without the Details - * button. - *

- * Note: The error message will be written to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param reason - * The reason for the error. - */ - public void displayError(String title, String msg, String reason) { - display(IStatus.ERROR, title, msg, reason, null, null); - } - - /** - * Displays the given error message in an error dialog without the Details - * button. - *

- * Note: The error message and the exception stack trace will be written to - * the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param reason - * The reason for the error. - * @param ex - * The exception associated with the error. - */ - public void displayError(String title, String msg, String reason, - Throwable ex) { - display(IStatus.ERROR, title, msg, reason, null, ex); - } - - /** - * Displays the given error message in an error dialog. The Details button - * will be displayed if the details parameter it not null or - * empty. - *

- * Note: The error message will be written to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param reason - * The reason for the error. - * @param details - * The error details. - */ - public void displayError(String title, String msg, String reason, - String details) { - display(IStatus.ERROR, title, msg, reason, details, null); - } - - /** - * Displays the given error message in an error dialog. The Details button - * will be displayed if the details parameter it not null or - * empty. - *

- * Note: The error message and the exception stack trace will be written to - * the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param reason - * The reason for the error. - * @param details - * The error details. - * @param ex - * The exception associated with the error. - */ - public void displayError(String title, String msg, String reason, - String details, Throwable ex) { - display(IStatus.ERROR, title, msg, reason, details, ex); - } - - /** - * Displays the given error status in an error dialog. - *

- * Note: The error message and the exception stack trace will be written to - * the log file. - * - * @param title - * The title for the error dialog. - * @param status - * The error status. - */ - public int displayError(String title, IStatus status) { - return display(title, null, status); - } - - /** - * Displays the given error status in an error dialog. - *

- * Note: The error message and the exception stack trace will be written to - * the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param status - * The error status. - */ - public int displayError(String title, String msg, IStatus status) { - return display(title, msg, status); - } - - /** - * Displays the given warning message in a warning dialog without the - * warning reason and Details button. - *

- * Note: The waning message will be written to the log file. - * - * @param title - * The title for the warning dialog. - * @param msg - * The warning message. - */ - public void displayWarning(String title, String msg) { - display(IStatus.WARNING, title, msg, null, null, null); - } - - /** - * Displays the given warning message in a warning dialog without the - * warning reason and Details button. - *

- * Note: The warning message and the exception stack trace will be written - * to the log file. - * - * @param title - * The title for the warning dialog. - * @param msg - * The warning message. - * @param ex - * The exception associated with the warning. - */ - public void displayWarning(String title, String msg, Throwable ex) { - display(IStatus.WARNING, title, msg, null, null, ex); - } - - /** - * Displays the given warning message in a warning dialog without the - * warning reason and Details button. - *

- * Note: The waning message will be written to the log file. - * - * @param title - * The title for the warning dialog. - * @param msg - * The warning message. - * @param reason - * The reason for the warning. - */ - public void displayWarning(String title, String msg, String reason) { - display(IStatus.WARNING, title, msg, reason, null, null); - } - - /** - * Displays the given warning message in a warning dialog without the - * warning reason and Details button. - *

- * Note: The warning message and the exception stack trace will be written - * to the log file. - * - * @param title - * The title for the warning dialog. - * @param msg - * The warning message. - * @param reason - * The reason for the warning. - * @param ex - * The exception associated with the warning. - */ - public void displayWarning(String title, String msg, String reason, - Throwable ex) { - display(IStatus.WARNING, title, msg, reason, null, ex); - } - - /** - * Displays the given warning message in a warning dialog. The Details - * button will be displayed if the details parameter it not - * null or empty. - *

- * Note: The waning message will be written to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The warning message. - * @param reason - * The reason for the warning. - * @param details - * The warning details. - */ - public void displayWarning(String title, String msg, String reason, - String details) { - display(IStatus.WARNING, title, msg, reason, details, null); - } - - /** - * Displays the given warning message in a warning dialog. The Details - * button will be displayed if the details parameter it not - * null or empty. - *

- * Note: The warning message and the exception stack trace will be written - * to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The warning message. - * @param reason - * The reason for the warning. - * @param details - * The warning details. - * @param ex - * The exception associated with the warning. - */ - public void displayWarning(String title, String msg, String reason, - String details, Throwable ex) { - display(IStatus.WARNING, title, msg, reason, details, ex); - } - - /** - * Displays the given warning status in an error dialog. - *

- * Note: The warning message and the exception stack trace will be written - * to the log file. - * - * @param title - * The title for the error dialog. - * @param status - * The error status. - */ - public void displayWarning(String title, IStatus status) { - display(title, null, status); - } - - /** - * Displays the given warning status in an error dialog. - *

- * Note: The warning message and the exception stack trace will be written - * to the log file. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param status - * The error status. - */ - public void displayWarning(String title, String msg, IStatus status) { - display(title, msg, status); - } - - /** - * Displays the given error or warning message in an error or warning - * dialog. The Details button will be displayed if the details - * parameter it not null or empty. - * - * @param severity - * The severity, either IStatus.ERROR or IStatus.WARNING. - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param reason - * The reason for the error. - * @param details - * The error details. - * @param ex - * The exception associated with the error. - */ - public synchronized void display(int severity, String title, String msg, - String reason, String details, Throwable ex) { - if (msg == null && ex != null) { - msg = ex.getMessage(); - } - - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - if (severity == IStatus.ERROR || severity == IStatus.WARNING) { - logger.logMsg(severity, msg, ex); - } else { - throw new IllegalArgumentException( - "severity argument must be IStatus.ERROR or IStatus.WARNING"); //$NON-NLS-1$ - } - - Image oldImage = org.eclipse.jface.dialogs.ErrorDialog - .getDefaultImage(); - Image shellImage = getShellImage(); - if (shellImage != null) { - ErrorDialog.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - - if (details != null && details.length() > 0) { - MultiStatus mStatus = new MultiStatus(pluginId, IStatus.OK, reason, - ex); - Status status = new Status(severity, pluginId, IStatus.OK, details, - ex); - mStatus.add(status); - org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title, msg, - mStatus); - } else if (reason != null && reason.length() > 0) { - Status status = new Status(severity, pluginId, IStatus.OK, reason, - ex); - org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title, msg, - status); - } else { - if (severity == IStatus.ERROR) { - WrappedMessageDialog.openError(shell, title, msg); - } else if (severity == IStatus.WARNING) { - WrappedMessageDialog.openWarning(shell, title, msg); - } - } - - if (shellImage != null) { - ErrorDialog.setDefaultImage(oldImage); - } - } - - /** - * Displays the given error or warning message in an error or warning - * dialog. The Details button will be displayed if the details - * parameter it not null or empty. - * - * @param title - * The title for the error dialog. - * @param status - * The error status. - */ - public synchronized int display(String title, IStatus status) { - return display(title, null, status); - } - - /** - * Displays the given error or warning message in an error or warning - * dialog. The Details button will be displayed if the details - * parameter it not null or empty. - * - * @param title - * The title for the error dialog. - * @param msg - * The error message. - * @param status - * The error status. - */ - public synchronized int display(String title, String msg, IStatus status) { - if (status == null) { - throw new IllegalArgumentException("status argument cannot be null"); //$NON-NLS-1$ - } - - if (msg == null) { - msg = status.getMessage(); - } - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - int severity = status.getSeverity(); - if (severity == IStatus.ERROR || severity == IStatus.WARNING) { - logger.logMsg(severity, msg, status.getException()); - } - - Image oldImage = org.eclipse.jface.dialogs.ErrorDialog - .getDefaultImage(); - Image shellImage = getShellImage(); - if (shellImage != null) { - ErrorDialog.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - - int rc = org.eclipse.jface.dialogs.ErrorDialog.openError(shell, title, - msg, status); - - if (shellImage != null) { - ErrorDialog.setDefaultImage(oldImage); - } - - return rc; - } - - /** - * Displays the given message in a informational dialog with an "OK" button. - * - * @param title - * The title for the information dialog. - * @param msg - * The message to display. - */ - public void displayInfo(String title, String msg) { - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - Image oldImage = WrappedMessageDialog.getDefaultImage(); - Image shellImage = getShellImage(); - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - WrappedMessageDialog.openInformation(shell, title, msg); - - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(oldImage); - } - } - - /** - * Displays the given message in a question dialog with a "Yes" and "No" - * button. - * - * @param title - * The title for the information dialog. - * @param msg - * The message to display. - */ - public boolean displayPrompt(String title, String msg) { - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - Image oldImage = WrappedMessageDialog.getDefaultImage(); - Image shellImage = getShellImage(); - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - boolean result = WrappedMessageDialog.openQuestion(shell, title, msg); - - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(oldImage); - } - - return result; - } - - /** - * Displays the given message in a confirmation dialog with a "Yes" and - * "Cancel" button. - * - * @param title - * The title for the information dialog. - * @param msg - * The message to display. - */ - public boolean displayConfirmation(String title, String msg) { - return displayConfirmationWithCheckBox(title, msg, null) > 0; - } - - //return: 0 = cancel, 1 = ok with check-box checked, 2 = ok with check box unchecked - public int displayConfirmationWithCheckBox(String title, String msg, String checkBoxLabel) { - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - Image oldImage = WrappedMessageDialog.getDefaultImage(); - Image shellImage = getShellImage(); - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - - if (shellImage != null) { - WrappedMessageDialog.setDefaultImage(oldImage); - } - - if (checkBoxLabel == null) { - boolean b = WrappedMessageDialog.openConfirm(shell, title, msg); - return b ? 1 : 0; - } - - return WrappedMessageDialog.openConfirmWithCheckBox(shell, title, msg, checkBoxLabel); - } - - public int displayConfirmation(String title, String msg, IStatus status) { - if (status == null) { - throw new IllegalArgumentException("status argument cannot be null"); //$NON-NLS-1$ - } - - if (msg == null) { - msg = status.getMessage(); - } - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - Image shellImage = getShellImage(); - if (shellImage != null) { - ErrorDialogNoReason.setDefaultImage(shellImage); - } - - Shell shell = getShell(); - - int rc = ErrorDialogNoReason.openError(shell, title, msg, status); - - return rc; - - } - - /** - * Returns the image for the current shell. - * - * @return The current shell image. - */ - private Image getShellImage() { - IWorkbench workbench = PlatformUI.getWorkbench(); - if (workbench != null) { - IWorkbenchWindow workbenchWindow = workbench - .getActiveWorkbenchWindow(); - if (workbenchWindow != null) { - Shell shell = workbenchWindow.getShell(); - if (shell != null) { - return shell.getImage(); - } - } - } - return null; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PerspectiveUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PerspectiveUtil.java deleted file mode 100644 index a928ec798c8..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PerspectiveUtil.java +++ /dev/null @@ -1,127 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IPerspectiveRegistry; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.WorkbenchException; - -/** - * Utility class for accessing perspectives. - * - * @author Kelvin Low - * @since 1.0 - */ -public class PerspectiveUtil { - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private PerspectiveUtil() { - } - - /** - * Returns the ID of the active perspective. - * - * @return The active perspective ID. - */ - public static String getActivePerspectiveId() { - if (PlatformUI.getWorkbench() == null || PlatformUI.getWorkbench() - .getActiveWorkbenchWindow() == null) { - return null; - } - - IWorkbenchPage activePage = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage(); - if (activePage != null) { - IPerspectiveDescriptor activePerspective = activePage - .getPerspective(); - return activePerspective.getId(); - } - return null; - } - - /** - * Opens a perspective. - * - * @param perspectiveId - * The perspective ID. - * @return The previously active perspective. - */ - public static IPerspectiveDescriptor openPerspective(String perspectiveId) { - IWorkbenchPage activePage = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage(); - if (activePage != null) { - IPerspectiveRegistry registry = PlatformUI.getWorkbench() - .getPerspectiveRegistry(); - IPerspectiveDescriptor oldPerspective = activePage.getPerspective(); - if (!oldPerspective.getId().equals(perspectiveId)) { - IPerspectiveDescriptor perspective = registry - .findPerspectiveWithId(perspectiveId); - activePage.setPerspective(perspective); - } - return oldPerspective; - } else { - IWorkbenchWindow activeWindow = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow(); - try { - PlatformUI.getWorkbench().showPerspective( - perspectiveId, activeWindow); - } catch (WorkbenchException e) { - } - } - return null; - } - - /** - * Returns true if the given perspective is already active. - * - * @param perspectiveId - * The perspective ID. - * @return - */ - public static boolean isActivePerspective(String perspectiveId) { - String activePerspectiveId = PerspectiveUtil.getActivePerspectiveId(); - if (perspectiveId == null || activePerspectiveId == null) { - return false; - } - return activePerspectiveId.equalsIgnoreCase(perspectiveId); - } - - /** - * Returns the view part with the given view ID. - * - * @param viewId - * The view ID. - * @return The view part. - */ - public static IViewPart getView(String viewId) { - try { - IWorkbenchPage activePage = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage(); - if (activePage != null) { - IViewPart view = activePage.findView(viewId); - if (view == null) { - view = activePage.showView(viewId); - } - return view; - } - } catch (Exception e) { - } - return null; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PreferenceUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PreferenceUtil.java deleted file mode 100644 index 158d7d882ec..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/PreferenceUtil.java +++ /dev/null @@ -1,173 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jface.preference.IPreferenceStore; - -import com.ibm.icu.util.StringTokenizer; - -/** - * Utility class for accessing preferences. - * - * @author Kelvin Low - * @since 1.2 - */ -public class PreferenceUtil { - - // The multi-string preference delimiter. - private static final String PREFERENCE_DELIMITER = ";"; //$NON-NLS-1$ - - /** - * Gets a list containing string values associated with a named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @return a list of string values - */ - public static List getList(IPreferenceStore prefStore, String name) { - List values = new ArrayList(); - if (prefStore != null && name != null) { - String value = prefStore.getString(name); - StringTokenizer tokenizer = new StringTokenizer(value, - PREFERENCE_DELIMITER); - int tokenCount = tokenizer.countTokens(); - for (int i = 0; i < tokenCount; i++) { - values.add(tokenizer.nextToken()); - } - } - return values; - } - - /** - * Gets the string values associated with a named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @return a list of string preference values - */ - public static String[] getStringValues(IPreferenceStore prefStore, - String name) { - List list = getList(prefStore, name); - String[] values = new String[list.size()]; - list.toArray(values); - return values; - } - - /** - * Saves a list containing string values associated with a named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @param values - * a list of string values - */ - public static void setList(IPreferenceStore prefStore, String name, - List values) { - if (prefStore != null && name != null && values != null) { - StringBuffer buffer = new StringBuffer(); - for (Iterator it = values.iterator(); it.hasNext();) { - String value = (String) it.next(); - buffer.append(value); - buffer.append(PREFERENCE_DELIMITER); - } - prefStore.setValue(name, buffer.toString()); - } - } - - /** - * Adds a string value to a list containing string values associated with a - * named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @param value - * a string value - * @param defaultValue - * a default string value that will be added to the end of the - * list - */ - public static void addToList(IPreferenceStore prefStore, String name, - String value, String defaultValue) { - if (prefStore != null && name != null && value != null) { - List list = getList(prefStore, name); - list.remove(value); - list.add(0, value); - - //adjust the list according to the history size - int preferenceHistorySize = CommonPreferences.getPreferenceHistorySize(); - if (list.size() > preferenceHistorySize) { - list = list.subList(0, preferenceHistorySize - 1); - } - if (defaultValue != null && defaultValue.length() > 0) { - if (!list.contains(defaultValue)) { - if (list.size() == preferenceHistorySize) { - list.add(list.size() - 1, defaultValue); - } else { - list.add(defaultValue); - } - } - } - - setList(prefStore, name, list); - } - } - - /** - * Adds a string value to a list containing string values associated with a - * named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @param value - * a string value - */ - public static void addToList(IPreferenceStore prefStore, String name, - String value) { - addToList(prefStore, name, value, null); - } - - /** - * Saves an array of string values associated with a named preference. - * - * @param prefStore - * a preference store - * @param name - * the preference name - * @param values - * an array of string values - */ - public static void setStringValues(IPreferenceStore prefStore, String name, - String[] values) { - if (prefStore != null && name != null && values != null) { - StringBuffer buffer = new StringBuffer(); - for (int i = 0; i < values.length; i++) { - buffer.append(values[i]); - buffer.append(PREFERENCE_DELIMITER); - } - prefStore.setValue(name, buffer.toString()); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/WrappedMessageDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/WrappedMessageDialog.java deleted file mode 100644 index 926cc5ad791..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.ui/src/org/eclipse/epf/common/ui/util/WrappedMessageDialog.java +++ /dev/null @@ -1,208 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.ui.util; - -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; - -/** - * Displays a message dialog that displays wrapped text. - * - * @author Bingxue Xu - * @since 1.0 - */ -public class WrappedMessageDialog extends MessageDialog { - - public WrappedMessageDialog(Shell parentShell, String dialogTitle, - Image dialogTitleImage, String dialogMessage, int dialogImageType, - String[] dialogButtonLabels, int defaultIndex) { - super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, - dialogImageType, dialogButtonLabels, defaultIndex); - } - - protected Control createMessageArea(Composite composite) { - - Control rComposite = super.createMessageArea(composite); - - int minWidth = IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH;// + 300; - // TO-DO: need to revist the # of dialog display units and margin - // when in other languages - int charsPerLine = minWidth / 4 - 15; - GridData gd = (GridData) messageLabel.getLayoutData(); - gd.minimumWidth = minWidth; - messageLabel.setText(addLineBreaks(message, charsPerLine)); - - return rComposite; - } - - String addLineBreaks(String msg, int maxChars) { - // System.out.println("$$$ DEBUG: original message = " + msg); - - if (msg == null) - return null; - - StringBuffer strBuf = new StringBuffer(); - int count = 0; - for (int i = 0; i < msg.length(); i++) { - strBuf.append(msg.charAt(i)); - if (Character.isWhitespace(msg.charAt(i))) - count = 0; - else - count++; - - if (count >= maxChars) { - if (!Character.isWhitespace(msg.charAt(i))) { - strBuf.append("\n"); //$NON-NLS-1$ - } - count = 0; - } - } - - // System.out.println("$$$ DEBUG: broken message = " + - // strBuf.toString()); - return strBuf.toString(); - } - - public static boolean openConfirm(Shell parent, String title, String message) { - WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, QUESTION, new String[] { IDialogConstants.OK_LABEL, - IDialogConstants.CANCEL_LABEL }, 0); // OK is the - // default - return dialog.open() == 0; - } - - static class ConfirmWithCheckBoxDialog extends WrappedMessageDialog { - private String checkBoxLabel; - private Button checkBox; - private boolean checkBoxChecked = false; - - public ConfirmWithCheckBoxDialog(Shell parentShell, String dialogTitle, - Image dialogTitleImage, String dialogMessage, int dialogImageType, - String[] dialogButtonLabels, int defaultIndex, String checkBoxLabel) { - super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, - dialogImageType, dialogButtonLabels, defaultIndex); - this.checkBoxLabel = checkBoxLabel; - } - - @Override - protected Control createMessageArea(Composite composite) { - Control rComposite = super.createMessageArea(composite); - - checkBox = new Button(composite, SWT.CHECK); - checkBox.setText(checkBoxLabel); - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - gd.horizontalSpan = 3; - checkBox.setLayoutData(gd); - - return rComposite; - } - - protected void buttonPressed(int buttonId) { - checkBoxChecked = checkBox.getSelection(); - super.buttonPressed(buttonId); - } - - public boolean isCheckBoxChecked() { - return checkBoxChecked; - } - - } - - //return: 0 = cancel, 1 = ok with check-box checked, 2 = ok with check box unchecked - public static int openConfirmWithCheckBox(Shell parent, String title, String message, String checkBoxLabel) { - ConfirmWithCheckBoxDialog dialog = new ConfirmWithCheckBoxDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, QUESTION, new String[] { IDialogConstants.OK_LABEL, - IDialogConstants.CANCEL_LABEL }, 0, checkBoxLabel); // OK is the default - - int ix = dialog.open() ; - if (ix != 0) { - return 0; - } - - return dialog.isCheckBoxChecked() ? 1 : 2; - } - - public static void openError(Shell parent, String title, String message) { - WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, ERROR, new String[] { IDialogConstants.OK_LABEL }, 0); // ok - // is - // the - // default - dialog.open(); - return; - } - - public static void openInformation(Shell parent, String title, - String message) { - WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, INFORMATION, - new String[] { IDialogConstants.OK_LABEL }, 0); - // ok is the default - dialog.open(); - return; - } - - public static boolean openQuestion(Shell parent, String title, - String message) { - WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, QUESTION, new String[] { IDialogConstants.YES_LABEL, - IDialogConstants.NO_LABEL }, 0); // yes is the - // default - return dialog.open() == 0; - } - - public static void openWarning(Shell parent, String title, String message) { - WrappedMessageDialog dialog = new WrappedMessageDialog(parent, title, - null, // accept - // the - // default - // window - // icon - message, WARNING, new String[] { IDialogConstants.OK_LABEL }, 0); // ok - // is - // the - // default - dialog.open(); - return; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.classpath deleted file mode 100644 index 02159672985..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.project b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.project deleted file mode 100644 index e57f6e3d952..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.epf.common.win32.win32.x86 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF deleted file mode 100644 index 4c8e398d5f9..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.common.win32.win32.x86 -Bundle-Version: 1.5.0.qualifier -Bundle-Localization: plugin -Require-Bundle: org.eclipse.swt -Bundle-Vendor: %providerName -Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86)) -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/about.html b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/build.properties deleted file mode 100644 index ebe02751cbb..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.properties,\ - about.html diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/plugin.properties deleted file mode 100644 index ff010d4c880..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/plugin.properties +++ /dev/null @@ -1,15 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Win32 Common x86 -providerName=Eclipse.org diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java deleted file mode 100644 index 1a58b1dd316..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java +++ /dev/null @@ -1,218 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.win32; - -import org.eclipse.swt.dnd.ByteArrayTransfer; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.swt.internal.ole.win32.COM; -import org.eclipse.swt.internal.ole.win32.FORMATETC; -import org.eclipse.swt.internal.ole.win32.IDataObject; -import org.eclipse.swt.internal.ole.win32.STGMEDIUM; -import org.eclipse.swt.internal.win32.OS; - -/** - * The class HTMLTransfer provides a platform specific mechanism - * for converting text in HTML format represented as a java String - * to a platform specific representation of the data and vice versa. See - * Transfer for additional information. - * - *

- * An example of a java String containing HTML text is shown - * below: - *

- * - *
- *       String htmlData = "
- * 

- * This is a paragraph of text. - *

- * "; - *
- */ -public class Win32HTMLTransfer extends ByteArrayTransfer { - - static Win32HTMLTransfer _instance = new Win32HTMLTransfer(); - - static final String HTML_FORMAT = "HTML Format"; //$NON-NLS-1$ - - static final int HTML_FORMATID = registerType(HTML_FORMAT); - - static final String NUMBER = "00000000"; //$NON-NLS-1$ - - static final String HEADER = "Version:0.9\r\nStartHTML:" + NUMBER //$NON-NLS-1$ - + "\r\nEndHTML:" + NUMBER + "\r\nStartFragment:" + NUMBER //$NON-NLS-1$ //$NON-NLS-2$ - + "\r\nEndFragment:" + NUMBER + "\r\n"; //$NON-NLS-1$ //$NON-NLS-2$ - - static final String PREFIX = ""; //$NON-NLS-1$ - - static final String SUFFIX = ""; //$NON-NLS-1$ - - static final String StartFragment = "StartFragment:"; //$NON-NLS-1$ - - static final String EndFragment = "EndFragment:"; //$NON-NLS-1$ - - public Win32HTMLTransfer() { - } - - /** - * Returns the singleton instance of the HTMLTransfer class. - * - * @return the singleton instance of the HTMLTransfer class - */ - public static Win32HTMLTransfer getInstance() { - return _instance; - } - - /** - * This implementation of javaToNative converts - * HTML-formatted text represented by a java String to a - * platform specific representation. For additional information see - * Transfer#javaToNative. - * - * @param object - * a java String containing HTML text - * @param transferData - * an empty TransferData object; this object will - * be filled in on return with the platform specific format of - * the data - */ - public void javaToNative(Object object, TransferData transferData) { - if (!checkHTML(object) || !isSupportedType(transferData)) { - DND.error(DND.ERROR_INVALID_DATA); - } - String string = (String) object; - int count = string.length(); - char[] chars = new char[count + 1]; - string.getChars(0, count, chars, 0); - int codePage = OS.GetACP(); - int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, - 0, null, null); - if (cchMultiByte == 0) { - transferData.stgmedium = new STGMEDIUM(); - transferData.result = COM.DV_E_STGMEDIUM; - return; - } - int startHTML = HEADER.length(); - int startFragment = startHTML + PREFIX.length(); - int endFragment = startFragment + cchMultiByte - 1; - int endHTML = endFragment + SUFFIX.length(); - - StringBuffer buffer = new StringBuffer(HEADER); - int maxLength = NUMBER.length(); - // startHTML - int start = buffer.toString().indexOf(NUMBER); - String temp = Integer.toString(startHTML); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // endHTML - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(endHTML); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // startFragment - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(startFragment); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // endFragment - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(endFragment); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - - buffer.append(PREFIX); - buffer.append(string); - buffer.append(SUFFIX); - - count = buffer.length(); - chars = new char[count + 1]; - buffer.getChars(0, count, chars, 0); - cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, - null, null); - int lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, - cchMultiByte); - OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, - cchMultiByte, null, null); - transferData.stgmedium = new STGMEDIUM(); - transferData.stgmedium.tymed = COM.TYMED_HGLOBAL; - transferData.stgmedium.unionField = lpMultiByteStr; - transferData.stgmedium.pUnkForRelease = 0; - transferData.result = COM.S_OK; - return; - } - - /** - * This implementation of nativeToJava converts a platform - * specific representation of HTML text to a java String. - * For additional information see Transfer#nativeToJava. - * - * @param transferData - * the platform specific representation of the data to be been - * converted - * @return a java String containing HTML text if the - * conversion was successful; otherwise null - */ - public Object nativeToJava(TransferData transferData) { - if (!isSupportedType(transferData) || transferData.pIDataObject == 0) - return null; - IDataObject data = new IDataObject(transferData.pIDataObject); - data.AddRef(); - STGMEDIUM stgmedium = new STGMEDIUM(); - FORMATETC formatetc = transferData.formatetc; - stgmedium.tymed = COM.TYMED_HGLOBAL; - transferData.result = data.GetData(formatetc, stgmedium); - data.Release(); - if (transferData.result != COM.S_OK) - return null; - int hMem = stgmedium.unionField; - - try { - int lpMultiByteStr = OS.GlobalLock(hMem); - if (lpMultiByteStr == 0) - return null; - try { - int codePage = OS.GetACP(); - int cchWideChar = OS.MultiByteToWideChar(codePage, - OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0); - if (cchWideChar == 0) - return null; - char[] lpWideCharStr = new char[cchWideChar - 1]; - OS - .MultiByteToWideChar(codePage, OS.MB_PRECOMPOSED, - lpMultiByteStr, -1, lpWideCharStr, - lpWideCharStr.length); - return new String(lpWideCharStr); - } finally { - OS.GlobalUnlock(hMem); - } - } finally { - OS.GlobalFree(hMem); - } - } - - protected int[] getTypeIds() { - return new int[] { HTML_FORMATID }; - } - - protected String[] getTypeNames() { - return new String[] { HTML_FORMAT }; - } - - boolean checkHTML(Object object) { - return (object != null && object instanceof String && ((String) object) - .length() > 0); - } - - protected boolean validate(Object object) { - return checkHTML(object); - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/package.html deleted file mode 100644 index 2d697e1a095..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86/src/org/eclipse/epf/common/win32/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides windows-specific clipboard transfer services. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.classpath deleted file mode 100644 index 02159672985..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.project b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.project deleted file mode 100644 index 0801e35e8a0..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.epf.common.win32.win32.x86_64 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/META-INF/MANIFEST.MF deleted file mode 100644 index 830ab37eddc..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.common.win32.win32.x86_64 -Bundle-Version: 1.5.0.qualifier -Bundle-Localization: plugin -Require-Bundle: org.eclipse.swt -Bundle-Vendor: %providerName -Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64)) -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/about.html b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/build.properties deleted file mode 100644 index ebe02751cbb..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.properties,\ - about.html diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/plugin.properties deleted file mode 100644 index 0992ed99e31..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/plugin.properties +++ /dev/null @@ -1,15 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Win32 Common x86_64 -providerName=Eclipse.org diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java deleted file mode 100644 index a5d8162ba96..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/Win32HTMLTransfer.java +++ /dev/null @@ -1,218 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.win32; - -import org.eclipse.swt.dnd.ByteArrayTransfer; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.TransferData; -import org.eclipse.swt.internal.ole.win32.COM; -import org.eclipse.swt.internal.ole.win32.FORMATETC; -import org.eclipse.swt.internal.ole.win32.IDataObject; -import org.eclipse.swt.internal.ole.win32.STGMEDIUM; -import org.eclipse.swt.internal.win32.OS; - -/** - * The class HTMLTransfer provides a platform specific mechanism - * for converting text in HTML format represented as a java String - * to a platform specific representation of the data and vice versa. See - * Transfer for additional information. - * - *

- * An example of a java String containing HTML text is shown - * below: - *

- * - *
- *       String htmlData = "
- * 

- * This is a paragraph of text. - *

- * "; - *
- */ -public class Win32HTMLTransfer extends ByteArrayTransfer { - - static Win32HTMLTransfer _instance = new Win32HTMLTransfer(); - - static final String HTML_FORMAT = "HTML Format"; //$NON-NLS-1$ - - static final int HTML_FORMATID = registerType(HTML_FORMAT); - - static final String NUMBER = "00000000"; //$NON-NLS-1$ - - static final String HEADER = "Version:0.9\r\nStartHTML:" + NUMBER //$NON-NLS-1$ - + "\r\nEndHTML:" + NUMBER + "\r\nStartFragment:" + NUMBER //$NON-NLS-1$ //$NON-NLS-2$ - + "\r\nEndFragment:" + NUMBER + "\r\n"; //$NON-NLS-1$ //$NON-NLS-2$ - - static final String PREFIX = ""; //$NON-NLS-1$ - - static final String SUFFIX = ""; //$NON-NLS-1$ - - static final String StartFragment = "StartFragment:"; //$NON-NLS-1$ - - static final String EndFragment = "EndFragment:"; //$NON-NLS-1$ - - public Win32HTMLTransfer() { - } - - /** - * Returns the singleton instance of the HTMLTransfer class. - * - * @return the singleton instance of the HTMLTransfer class - */ - public static Win32HTMLTransfer getInstance() { - return _instance; - } - - /** - * This implementation of javaToNative converts - * HTML-formatted text represented by a java String to a - * platform specific representation. For additional information see - * Transfer#javaToNative. - * - * @param object - * a java String containing HTML text - * @param transferData - * an empty TransferData object; this object will - * be filled in on return with the platform specific format of - * the data - */ - public void javaToNative(Object object, TransferData transferData) { - if (!checkHTML(object) || !isSupportedType(transferData)) { - DND.error(DND.ERROR_INVALID_DATA); - } - String string = (String) object; - int count = string.length(); - char[] chars = new char[count + 1]; - string.getChars(0, count, chars, 0); - int codePage = OS.GetACP(); - int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, - 0, null, null); - if (cchMultiByte == 0) { - transferData.stgmedium = new STGMEDIUM(); - transferData.result = COM.DV_E_STGMEDIUM; - return; - } - int startHTML = HEADER.length(); - int startFragment = startHTML + PREFIX.length(); - int endFragment = startFragment + cchMultiByte - 1; - int endHTML = endFragment + SUFFIX.length(); - - StringBuffer buffer = new StringBuffer(HEADER); - int maxLength = NUMBER.length(); - // startHTML - int start = buffer.toString().indexOf(NUMBER); - String temp = Integer.toString(startHTML); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // endHTML - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(endHTML); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // startFragment - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(startFragment); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - // endFragment - start = buffer.toString().indexOf(NUMBER, start); - temp = Integer.toString(endFragment); - buffer.replace(start + maxLength - temp.length(), start + maxLength, - temp); - - buffer.append(PREFIX); - buffer.append(string); - buffer.append(SUFFIX); - - count = buffer.length(); - chars = new char[count + 1]; - buffer.getChars(0, count, chars, 0); - cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, - null, null); - long lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, - cchMultiByte); - OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, - cchMultiByte, null, null); - transferData.stgmedium = new STGMEDIUM(); - transferData.stgmedium.tymed = COM.TYMED_HGLOBAL; - transferData.stgmedium.unionField = lpMultiByteStr; - transferData.stgmedium.pUnkForRelease = 0; - transferData.result = COM.S_OK; - return; - } - - /** - * This implementation of nativeToJava converts a platform - * specific representation of HTML text to a java String. - * For additional information see Transfer#nativeToJava. - * - * @param transferData - * the platform specific representation of the data to be been - * converted - * @return a java String containing HTML text if the - * conversion was successful; otherwise null - */ - public Object nativeToJava(TransferData transferData) { - if (!isSupportedType(transferData) || transferData.pIDataObject == 0) - return null; - IDataObject data = new IDataObject(transferData.pIDataObject); - data.AddRef(); - STGMEDIUM stgmedium = new STGMEDIUM(); - FORMATETC formatetc = transferData.formatetc; - stgmedium.tymed = COM.TYMED_HGLOBAL; - transferData.result = data.GetData(formatetc, stgmedium); - data.Release(); - if (transferData.result != COM.S_OK) - return null; - long hMem = stgmedium.unionField; - - try { - long lpMultiByteStr = OS.GlobalLock(hMem); - if (lpMultiByteStr == 0) - return null; - try { - int codePage = OS.GetACP(); - int cchWideChar = OS.MultiByteToWideChar(codePage, - OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0); - if (cchWideChar == 0) - return null; - char[] lpWideCharStr = new char[cchWideChar - 1]; - OS - .MultiByteToWideChar(codePage, OS.MB_PRECOMPOSED, - lpMultiByteStr, -1, lpWideCharStr, - lpWideCharStr.length); - return new String(lpWideCharStr); - } finally { - OS.GlobalUnlock(hMem); - } - } finally { - OS.GlobalFree(hMem); - } - } - - protected int[] getTypeIds() { - return new int[] { HTML_FORMATID }; - } - - protected String[] getTypeNames() { - return new String[] { HTML_FORMAT }; - } - - boolean checkHTML(Object object) { - return (object != null && object instanceof String && ((String) object) - .length() > 0); - } - - protected boolean validate(Object object) { - return checkHTML(object); - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/package.html deleted file mode 100644 index 2d697e1a095..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common.win32.win32.x86_64/src/org/eclipse/epf/common/win32/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides windows-specific clipboard transfer services. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.common/.classpath deleted file mode 100644 index 4848249846f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/.project b/extraplugins/epf-richtext/org.eclipse.epf.common/.project deleted file mode 100644 index 9164759b2ef..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.epf.common - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.common/META-INF/MANIFEST.MF deleted file mode 100644 index ca607535eb4..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/META-INF/MANIFEST.MF +++ /dev/null @@ -1,21 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.common;singleton:=true -Bundle-Version: 1.5.0.qualifier -Bundle-ClassPath: common.jar -Bundle-Activator: org.eclipse.epf.common.CommonPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Require-Bundle: com.ibm.icu;visibility:=reexport, - org.eclipse.core.resources;visibility:=reexport, - org.eclipse.core.runtime;visibility:=reexport, - org.apache.ant;visibility:=reexport -Eclipse-LazyStart: true -Export-Package: org.eclipse.epf.common, - org.eclipse.epf.common.preferences, - org.eclipse.epf.common.serviceability, - org.eclipse.epf.common.utils, - org.eclipse.epf.common.xml -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/about.html b/extraplugins/epf-richtext/org.eclipse.epf.common/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.common/build.properties deleted file mode 100644 index 1b2536daec7..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.common.jar = src/ -output.common.jar = bin/ -bin.includes = common.jar,\ - plugin.properties,\ - META-INF/,\ - about.html,\ - plugin.xml diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.properties deleted file mode 100644 index 08c7275f893..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.properties +++ /dev/null @@ -1,15 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Common -providerName=Eclipse.org diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.xml b/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.xml deleted file mode 100644 index aff271b9081..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/plugin.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlFormatter.exsd b/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlFormatter.exsd deleted file mode 100644 index a06c38b4166..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlFormatter.exsd +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - [Enter description of this extension point.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlParser.exsd b/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlParser.exsd deleted file mode 100644 index 38a8881f97e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/htmlParser.exsd +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - [Enter description of this extension point.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/markerAttributeContributer.exsd b/extraplugins/epf-richtext/org.eclipse.epf.common/schema/markerAttributeContributer.exsd deleted file mode 100644 index f2a081cf2e3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/markerAttributeContributer.exsd +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - Allow adding addtional attributes to markers generated from EPF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.5 - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - org.eclipse.epf.common.utils.IMarkerAttributeContributer - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - - - - - //------------------------------------------------------------------------------ -// Copyright (c) 2005, 2008 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/objectFactory.exsd b/extraplugins/epf-richtext/org.eclipse.epf.common/schema/objectFactory.exsd deleted file mode 100644 index ffa9a99bd00..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/schema/objectFactory.exsd +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - Allow to create object through the extension - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.5 - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - package org.eclipse.epf.common.utils.IObjectFactory - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java deleted file mode 100644 index b7593501458..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/AbstractActivator.java +++ /dev/null @@ -1,518 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.Properties; -import java.util.ResourceBundle; - -import org.eclipse.core.internal.runtime.InternalPlatform; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.epf.common.preferences.IPreferenceStoreWrapper; -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.epf.common.utils.I18nUtil; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * The abstract base class for all EPF plug-ins. - * - * @author Kelvin Low - * @author Jinhua Xi - * @author Phong Nguyen Le - * @since 1.0 - */ -public abstract class AbstractActivator extends Plugin implements IActivator { - - // The relative path to the icons. - private static final String ICON_PATH = "icons/"; //$NON-NLS-1$; - - // The logger hash map. - private static Map loggers = new HashMap(); - - // The message dialog hash map. - //private static Map msgDialogs = new HashMap(); - - // The shared image hash map. - //private static Map sharedImages = new HashMap(); - - // The resource bundle for this plug-in. - private ResourceBundle resourceBundle; - - // This plug-in ID. - private String pluginId; - - // The plug-in install URL. - private URL installURL; - - // The plug-in install path. - private String installPath; - - // The plug-in icon URL. - protected URL iconURL; - - // The profiling flag. - private boolean profiling; - - /** - * Default constructor. - */ - public AbstractActivator() { - super(); - } - - /** - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - - init(context); - - // set the - if (isDebugging()) { - getLogger().logInfo("Started " + pluginId); //$NON-NLS-1$ - } - } - - /** - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(BundleContext) - */ - public void stop(BundleContext context) throws Exception { - // Free the shared images. -// for (Iterator images = sharedImages.values().iterator(); images -// .hasNext();) { -// Image image = (Image) images.next(); -// if (image != null && !image.isDisposed()) { -// image.dispose(); -// } -// } - - super.stop(context); - - if (isDebugging()) { - getLogger().logInfo("Stopped " + pluginId); //$NON-NLS-1$ - } - } - - /** - * Initializes this plug-in. - * - * @param context - * The bundle context. - */ - protected void init(BundleContext context) throws Exception { - // Get the bundle for this plug-in. - Bundle bundle = getBundle(); - - // Get the resouce bundle for this plug-in. - resourceBundle = Platform.getResourceBundle(bundle); - - // Get the ID for this plug-in. - pluginId = bundle.getSymbolicName(); - - if (isDebugging()) { - getLogger().logInfo("Initializing " + pluginId); //$NON-NLS-1$ - } - - // Get the install path of this plug-in. - installURL = bundle.getEntry("/"); //$NON-NLS-1$ - - try { - installPath = FileLocator.resolve(installURL).getPath(); - } catch (IOException e) { - installPath = Platform.getInstallLocation().getURL().getPath(); - } - - try { - iconURL = new URL(installURL, ICON_PATH); - } catch (IOException e) { - } - - String symbolicName = bundle.getSymbolicName(); - if (symbolicName != null) { - String key = symbolicName + "/profiling"; //$NON-NLS-1$ - String value = InternalPlatform.getDefault().getOption(key); - profiling = value == null ? false : value.equalsIgnoreCase("true"); //$NON-NLS-1$ - } - - if (isDebugging()) { - getLogger().logInfo( - "Initialized " + pluginId + ", installPath=" + installPath); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Returns the ID of this plug-in. - * - * @return The ID of this plug-in. - */ - public String getId() { - return pluginId; - } - - /** - * Returns the install URL of this plug-in. - * - * @param The - * install URL of this plug-in. - */ - public URL getInstallURL() { - return installURL; - } - - /** - * Returns the install path of this plug-in. - * - * @param The - * install path of this plug-in. - */ - public String getInstallPath() { - return installPath; - } - - /** - * Loads and returns the localized properties of a Java properties file. - *

- * - * @param path - * The properties file path relative to the plug-in root. - * @return A Properties object. - */ - public Properties getProperties(String path) throws IOException { - Properties props = new Properties(); - if (path == null) { - return props; - } - - String filePath = getLocalizedFile(path, true); - if (filePath != null) { - props.load(new FileInputStream(filePath)); - } - - return props; - } - - /** - * get the locale specific absolute file path name of the given file in the - * plugin. - * - * @param path - * The properties file path relative to the plug-in root. - * @return String the locale specific absolute file path name of the given - * file. - * @throws IOException - */ - public String getLocalizedFile(String path, boolean useDefault) - throws IOException { - String filePath = null; - String fileName = FileUtil.getFileName(path); - int index = path.lastIndexOf(fileName); - String pathName = path.substring(0, index); - - Locale locale = Locale.getDefault(); - - Bundle bundle = getBundle(); - Bundle[] bundles = Platform.getFragments(bundle); - if (bundles != null) { - for (int i = 0; i < bundles.length; i++) { - URL entry = bundles[i].getEntry(pathName); - if (entry != null) { - URL url = FileLocator.resolve(entry); - filePath = I18nUtil.getLocalizedFile(url.getPath() - + fileName, locale); - if (filePath != null) { - break; - } - } - } - } - - if (filePath == null) { - URL entry = bundle.getEntry(path); - if (entry != null) { - URL url = FileLocator.resolve(entry); - filePath = I18nUtil.getLocalizedFile(url.getPath(), locale); - if (filePath == null && useDefault) { - filePath = url.getPath(); - } - } - } - - return filePath; - } - - /** - * for the given path in the plugin, find the localized files form the nl - * fragemenets and copy the localized files to the destination folder - * - * @param path - * String a relative path to the plugin root. The files in this - * folder will be iterated and their localized files will be - * copied over - * @param toDir - * FIle the destination folder - * @param recursive - * boolean recurively looking for files int the specified folder - * @param useLocaleFileName - * boolean if true the locale specific file names will be used in - * the copied destination, otherwise, the locale specific file - * name will be renamed to the default one in the destination - * folder - * @throws IOException - */ - public void copyLocalizedFiles(String path, File toDir, boolean recursive, - boolean useLocaleFileName) throws IOException { - String pluginPath = getInstallPath(); - URI pluginUri = new File(pluginPath).toURI(); - URI pathUri = new File(pluginPath, path).toURI(); - - List files = new ArrayList(); - File f = new File(pluginPath, path); - FileUtil.getAllFiles(f, files, recursive); - - // for each file found in the specified folder, get the localized file - for (Iterator it = files.iterator(); it.hasNext();) { - URI srcUri = ((File) it.next()).toURI(); - - // get the relative path of the file to the plugin root, then find - // the localized file - String relPath = pluginUri.relativize(srcUri).getPath(); - - // only get the locale specific file, don't include the default one - String localizedFile = getLocalizedFile(relPath, false); - if (localizedFile == null) { - continue; - } - - // need to change the target file path to relative to the path - // instead of the plugin root - relPath = pathUri.relativize(srcUri).getPath(); - File srcFile = new File(localizedFile); - File targetFile = new File(toDir, relPath); - File targetParent = targetFile.getParentFile(); - - // copy the file to the desitination - // if useLocaleFileName is true, the destination file name should - // also use the locale specific file name - if (useLocaleFileName) { - String fileName = srcFile.getName(); - targetFile = new File(targetParent, fileName); - } - - if (isDebugging()) { - System.out.println("Copying localized file: "); //$NON-NLS-1$ - System.out.println("Source: " + srcFile); //$NON-NLS-1$ - System.out.println("Target: " + targetFile); //$NON-NLS-1$ - System.out.println(""); //$NON-NLS-1$ - } - - try { - if (!targetParent.exists()) { - targetParent.mkdirs(); - } - - if (!targetFile.exists()) { - targetFile.createNewFile(); - } - - FileUtil.copyFile(srcFile, targetFile); - } catch (IOException e) { - e.printStackTrace(); - } - } - - } - - /** - * Returns the localized resource. - * - * @param key - * The resource key. - * @return The localized resource. - */ - public String getString(String key) { - if (resourceBundle != null) { - try { - return resourceBundle.getString(key); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the formatted localized message given the resource key and the - * message argument. - * - * @param key - * The resource key. - * @param argument - * The message argument. - * @return The formatted localized message. - */ - public String formatMessage(String key, Object argument) { - if (resourceBundle != null) { - try { - String msg = resourceBundle.getString(key); - Object[] arguments = { argument }; - return MessageFormat.format(msg, arguments); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the image URL given the relative path. - * - * @param relativePath - * The image's path relative to the plug-in's root. - * @return The image URL. - */ - public URL getImageURL(String relativePath) { - try { - URL url = new URL(iconURL, relativePath); - return FileLocator.resolve(url); - } catch (Exception e) { - return null; - } - } - -// /** -// * Returns the image descriptor given the relative path. -// * -// * @param relativePath -// * The image's path relative to the plug-in's root. -// * @return The image descriptor. -// */ -// public ImageDescriptor getImageDescriptor(String relativePath) { -// try { -// URL url = new URL(iconURL, relativePath); -// return ImageDescriptor.createFromURL(url); -// } catch (MalformedURLException e) { -// return ImageDescriptor.getMissingImageDescriptor(); -// } -// } -// -// /** -// * Returns the image given the relative path. -// *

-// * Note: The returned image need to be freed by the caller. -// * -// * @param relativePath -// * The image's path relative to the plug-in's root. -// * @return The image. -// */ -// public Image getImage(String relativePath) { -// Image image = null; -// -// ImageDescriptor imageDescriptor = getImageDescriptor(relativePath); -// if (imageDescriptor != null) { -// image = imageDescriptor.createImage(false); -// } -// -// return image; -// } -// -// /** -// * Returns the shared image given the relative path. -// *

-// * Note: The returned image will be automatically freed when the plug-in -// * shuts down. -// * -// * @param relativePath -// * The image's path relative to the plug-in's root. -// * @return The image. -// */ -// public Image getSharedImage(String relativePath) { -// Image image = (Image) sharedImages.get(relativePath); -// if (image != null) { -// return image; -// } -// -// ImageDescriptor imageDescriptor = getImageDescriptor(relativePath); -// if (imageDescriptor != null) { -// image = imageDescriptor.createImage(false); -// if (image != null) { -// sharedImages.put(relativePath, image); -// } -// } -// -// return image; -// } - - /** - * Returns the profiling flag. - * - * @return true if profiling is enabled for this plu-in - */ - public boolean isProfiling() { - return profiling; - } - - /** - * Returns the logger given the plug-in ID. - * - * @return The new or cached logger. - */ - public Logger getLogger() { - Logger logger = (Logger) loggers.get(pluginId); - if (logger == null) { - logger = new Logger(this); - loggers.put(pluginId, logger); - } - return logger; - } - - /** - * Logs the given object or message. - */ - public void log(Object logEntry) { - if (logEntry instanceof Throwable) { - ((Throwable) logEntry).printStackTrace(System.err); - } else { - System.err.println(logEntry); - } - } - - public IPreferenceStoreWrapper getPreferenceStore() { - return CommonPlugin.getDefault().getCommonPreferenceStore(); - } - - - public Object getContext() { - if ( CommonPlugin.getDefault().contextProvider != null ) { - return CommonPlugin.getDefault().contextProvider.getContext(); - } - - return null; - } - - public IMessageCallback getMsgCallback() { - return CommonPlugin.getDefault().msgCallback; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java deleted file mode 100644 index aa7c0c0d6ce..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/CommonPlugin.java +++ /dev/null @@ -1,82 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common; - -import org.eclipse.epf.common.preferences.IPreferenceStoreWrapper; -import org.osgi.framework.BundleContext; - -/** - * The Common plug-in activator. - */ -public final class CommonPlugin extends AbstractActivator { - - // The shared plug-in instance. - private static CommonPlugin plugin; - - /** - * Creates a new instance. - */ - public CommonPlugin() { - super(); - plugin = this; - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - } - - /** - * @see org.eclipse.epf.common.ui.AbstractPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - super.stop(context); - plugin = null; - } - - /** - * Gets the shared instance. - * - * @return the shared plug-in instance - */ - public static CommonPlugin getDefault() { - return plugin; - } - -// /** -// * set the store wrapper before it's being used. -// * @param storeWrapper -// */ - private IPreferenceStoreWrapper storeWrapper = null; - - public void setCommonPreferenceStore(IPreferenceStoreWrapper storeWrapper) { - this.storeWrapper = storeWrapper; - } - - public IPreferenceStoreWrapper getCommonPreferenceStore() { - return storeWrapper; - } - - // this is the context for message callback - // for eclipse client, this is the Shell object - IContextProvider contextProvider = null; - - public void setContextProvider(IContextProvider contextProvider) { - this.contextProvider = contextProvider; - } - - IMessageCallback msgCallback = null; - public void setMsgCallback(IMessageCallback msgCallback) { - this.msgCallback = msgCallback; - } -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IActivator.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IActivator.java deleted file mode 100644 index 4ddeed449fb..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IActivator.java +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2008 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common; - -import org.eclipse.epf.common.serviceability.Logger; - -/** - * @author Phong Nguyen Le - * @since 1.5 - * - */ -public interface IActivator { - String getId(); - Logger getLogger(); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IContextProvider.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IContextProvider.java deleted file mode 100644 index b361fcb8f17..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IContextProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common; - -public interface IContextProvider { - public Object getContext(); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLFormatter.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLFormatter.java deleted file mode 100644 index b9db6ff70d8..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLFormatter.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common; - -import java.io.UnsupportedEncodingException; -import java.util.regex.Pattern; - -public interface IHTMLFormatter { - - /* - * String location = m.group(1); - * String lineStr = m.group(2); - * String columnStr = m.group(3); - * String errorMsg = m.group(4); - */ - public static final Pattern jTidyErrorParser = Pattern - .compile( - "(line\\s+(\\d+)\\s+column\\s+(\\d+))\\s+-\\s+(.+)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$ - - public static final String DIAGNOSTIC_SOURCE = "org.eclipse.epf.common.IHTMLFormatter"; //$NON-NLS-1$ - - public static final Pattern p_whitespace = Pattern.compile("^\\s+", Pattern.MULTILINE); //$NON-NLS-1$ - - public String formatHTML(String html, boolean returnBodyOnly, boolean forceOutput, boolean makeBare, boolean word2000) throws UnsupportedEncodingException; - - public String formatHTML(String text) throws UnsupportedEncodingException; - - public String getLastErrorStr(); - - public String removeLeadingWhitespace(String input); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLParser.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLParser.java deleted file mode 100644 index dac8b72e6c3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IHTMLParser.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common; - -import java.io.File; -import java.util.Properties; - -public interface IHTMLParser { - - public String getText(); - - public String getSummary(); - - public Properties getMetaTags(); - - public void parse(File file) throws Exception; -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java deleted file mode 100644 index 362f33b983e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/IMessageCallback.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common; - - -public interface IMessageCallback { - - public void displayWarning(AbstractActivator plugin, String title, String msg, String reason); - public void displayWarning(AbstractActivator plugin, String msg, String reason, Throwable ex); - public void displayWarning(AbstractActivator plugin, String msg, String reason, String details, Throwable ex); - public void displayWarning(AbstractActivator plugin, String title, String msg, String reason, String details, Throwable ex); - - public void displayError(AbstractActivator plugin, String title, String msg); - public void displayError(AbstractActivator plugin, String title, String msg, Throwable ex); - public void displayError(AbstractActivator plugin, String title, String msg, String reason, String details, Throwable ex); - - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/package.html deleted file mode 100644 index dba34bd4a8f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides the activator for managing the Common plug-in's life cycle. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java deleted file mode 100644 index 938f1fc7820..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPreferenceStoreWrapper.java +++ /dev/null @@ -1,440 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.preferences; - - -/** - * wrapper interface for preference store - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public interface IPreferenceStoreWrapper { - - //public Object getStore(); - - public void addPropertyChangeListener(IPropertyChangeListenerWrapper listener); - public void firePropertyChangeEvent(String name, Object oldValue, - Object newValue); - public void removePropertyChangeListener(IPropertyChangeListenerWrapper listener); - - /** - * Returns the current value of the boolean-valued preference with the - * given name. - * Returns the default-default value (false) if there - * is no preference with the given name, or if the current value - * cannot be treated as a boolean. - * - * @param name the name of the preference - * @return the boolean-valued preference - */ - public boolean getBoolean(String name); - - /** - * Returns the default value for the boolean-valued preference - * with the given name. - * Returns the default-default value (false) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a boolean. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public boolean getDefaultBoolean(String name); - - /** - * Returns the default value for the double-valued preference - * with the given name. - * Returns the default-default value (0.0) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a double. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public double getDefaultDouble(String name); - - /** - * Returns the default value for the float-valued preference - * with the given name. - * Returns the default-default value (0.0f) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a float. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public float getDefaultFloat(String name); - - /** - * Returns the default value for the integer-valued preference - * with the given name. - * Returns the default-default value (0) if there - * is no default preference with the given name, or if the default - * value cannot be treated as an integer. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public int getDefaultInt(String name); - - /** - * Returns the default value for the long-valued preference - * with the given name. - * Returns the default-default value (0L) if there - * is no default preference with the given name, or if the default - * value cannot be treated as a long. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public long getDefaultLong(String name); - - /** - * Returns the default value for the string-valued preference - * with the given name. - * Returns the default-default value (the empty string "") - * is no default preference with the given name, or if the default - * value cannot be treated as a string. - * - * @param name the name of the preference - * @return the default value of the named preference - */ - public String getDefaultString(String name); - - /** - * Returns the current value of the double-valued preference with the - * given name. - * Returns the default-default value (0.0) if there - * is no preference with the given name, or if the current value - * cannot be treated as a double. - * - * @param name the name of the preference - * @return the double-valued preference - */ - public double getDouble(String name); - - /** - * Returns the current value of the float-valued preference with the - * given name. - * Returns the default-default value (0.0f) if there - * is no preference with the given name, or if the current value - * cannot be treated as a float. - * - * @param name the name of the preference - * @return the float-valued preference - */ - public float getFloat(String name); - - /** - * Returns the current value of the integer-valued preference with the - * given name. - * Returns the default-default value (0) if there - * is no preference with the given name, or if the current value - * cannot be treated as an integter. - * - * @param name the name of the preference - * @return the int-valued preference - */ - public int getInt(String name); - - /** - * Returns the current value of the long-valued preference with the - * given name. - * Returns the default-default value (0L) if there - * is no preference with the given name, or if the current value - * cannot be treated as a long. - * - * @param name the name of the preference - * @return the long-valued preference - */ - public long getLong(String name); - - /** - * Returns the current value of the string-valued preference with the - * given name. - * Returns the default-default value (the empty string "") - * if there is no preference with the given name, or if the current value - * cannot be treated as a string. - * - * @param name the name of the preference - * @return the string-valued preference - */ - public String getString(String name); - - /** - * Returns whether the current value of the preference with the given name - * has the default value. - * - * @param name the name of the preference - * @return true if the preference has a known default value - * and its current value is the same, and false otherwise - * (including the case where the preference is unknown to this store) - */ - public boolean isDefault(String name); - - /** - * Returns whether the current values in this property store - * require saving. - * - * @return true if at least one of values of - * the preferences known to this store has changed and - * requires saving, and false otherwise. - */ - public boolean needsSaving(); - - /** - * Sets the current value of the preference with the given name to - * the given string value without sending a property change. - *

- * This method does not fire a property change event and - * should only be used for setting internal preferences - * that are not meant to be processed by listeners. - * Normal clients should instead call #setValue. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void putValue(String name, String value); - - /** - * Sets the default value for the double-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, double value); - - /** - * Sets the default value for the float-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, float value); - - /** - * Sets the default value for the integer-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, int value); - - /** - * Sets the default value for the long-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, long value); - - /** - * Sets the default value for the string-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param defaultObject the new default value for the preference - */ - public void setDefault(String name, String defaultObject); - - /** - * Sets the default value for the boolean-valued preference with the - * given name. - *

- * Note that the current value of the preference is affected if - * the preference's current value was its old default value, in which - * case it changes to the new default value. If the preference's current - * is different from its old default value, its current value is - * unaffected. No property change events are reported by changing default - * values. - *

- * - * @param name the name of the preference - * @param value the new default value for the preference - */ - public void setDefault(String name, boolean value); - - /** - * Sets the current value of the preference with the given name back - * to its default value. - *

- * Note that the preferred way of re-initializing a preference to the - * appropriate default value is to call setToDefault. - * This is implemented by removing the named value from the store, - * thereby exposing the default value. - *

- * - * @param name the name of the preference - */ - public void setToDefault(String name); - - /** - * Sets the current value of the double-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, double value); - - /** - * Sets the current value of the float-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, float value); - - /** - * Sets the current value of the integer-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, int value); - - /** - * Sets the current value of the long-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, long value); - - /** - * Sets the current value of the string-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, String value); - - /** - * Sets the current value of the boolean-valued preference with the - * given name. - *

- * A property change event is reported if the current value of the - * preference actually changes from its previous value. In the event - * object, the property name is the name of the preference, and the - * old and new values are wrapped as objects. - *

- *

- * Note that the preferred way of re-initializing a preference to its - * default value is to call setToDefault. - *

- * - * @param name the name of the preference - * @param value the new current value of the preference - */ - public void setValue(String name, boolean value); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeEventWrapper.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeEventWrapper.java deleted file mode 100644 index e1b305c88a5..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeEventWrapper.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.preferences; - -/** - * wrapper interface for property change event - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public interface IPropertyChangeEventWrapper { - - /** - * Returns the new value of the property. - * - * @return the new value, or null if not known - * or not relevant (for instance if the property was removed). - */ - public Object getNewValue(); - - /** - * Returns the old value of the property. - * - * @return the old value, or null if not known - * or not relevant (for instance if the property was just - * added and there was no old value). - */ - public Object getOldValue(); - - /** - * Returns the name of the property that changed. - *

- * Warning: there is no guarantee that the property name returned - * is a constant string. Callers must compare property names using - * equals, not ==. - *

- * - * @return the name of the property that changed - */ - public String getProperty(); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java deleted file mode 100644 index 9e4f195a868..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/preferences/IPropertyChangeListenerWrapper.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - *******************************************************************************/ -package org.eclipse.epf.common.preferences; - -/** - * wrapper interface for property change listener - * - * @author Jinhua Xi - * @since 1.5 - * - */ -public interface IPropertyChangeListenerWrapper { - - public void propertyChange(IPropertyChangeEventWrapper event); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/DebugTrace.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/DebugTrace.java deleted file mode 100644 index 0e004d48034..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/DebugTrace.java +++ /dev/null @@ -1,104 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.serviceability; - -/** - * Helper utility for printing debug traces to the console. - * - * @author Kelvin Low - * @since 1.0 - */ -public class DebugTrace { - - /** - * Prints a debug trace to the console. - * - * @param instance - * a class instance - * @param method - * a method name - * @param msg - * a debug message - * @param th - * a Throwable object - */ - public static void print(Object instance, String method, String msg, - Throwable th) { - StringBuffer debugMsg = new StringBuffer(); - if (instance != null) { - debugMsg.append(instance.getClass().getName()); - if (method != null) { - debugMsg.append('.').append(method); - } - debugMsg.append(": "); //$NON-NLS-1$ - } - if (msg != null && msg.length() > 0) { - debugMsg.append(msg); - } - System.out.println(debugMsg); - if (th != null) { - th.printStackTrace(); - } - } - - /** - * Prints a debug trace to the console. - * - * @param instance - * a class instance - * @param method - * a method name - * @param th - * a Throwable object - */ - public static void print(Object instance, String method, Throwable th) { - print(instance, method, null, th); - } - - /** - * Prints a debug trace to the console. - * - * @param instance - * a class instance - * @param method - * a method name - * @param msg - * a debug message - */ - public static void print(Object instance, String method, String msg) { - print(instance, method, msg, null); - } - - /** - * Prints a debug trace to the console. - * - * @param instance - * a class instance - * @param method - * a method name - */ - public static void print(Object instance, String method) { - print(instance, method, null, null); - } - - /** - * Prints a debug trace to the console. - * - * @param th - * a Throwable object - */ - public static void print(Throwable th) { - if (th != null) { - th.printStackTrace(); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java deleted file mode 100644 index d8e12460230..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/Logger.java +++ /dev/null @@ -1,134 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.serviceability; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.core.runtime.Status; - -/** - * Generic logger used for logging status messages, warning messages, error - * messages, and exception stack traces. - * - * @author Kelvin Low - * @since 1.0 - */ -public class Logger { - - public static String SeeLogFileForMoreDetails; - - // The plug-in instance. - private Plugin plugin; - - // The plug-in ID. - private String pluginId; - - /** - * Create a new Logger given the plug-in instance. - * - * @param plugin - * The plugin instance. - */ - public Logger(Plugin plugin) { - this.plugin = plugin; - this.pluginId = plugin.getBundle().getSymbolicName(); //plugin.getId(); - } - - /** - * Logs the given error message. - * - * @param msg - * The error message. - */ - public void logError(String msg) { - logMsg(IStatus.ERROR, msg, null); - } - - /** - * Logs the given exception. - * - * @param ex - * The exception. - */ - public void logError(Throwable ex) { - logMsg(IStatus.ERROR, null, ex); - } - - /** - * Logs the given error message and exception. - * - * @param msg - * The error message. - * @param ex - * The exception. - */ - public void logError(String msg, Throwable ex) { - logMsg(IStatus.ERROR, msg, ex); - } - - /** - * Logs the given warning message. - * - * @param msg - * The warning message. - */ - public void logWarning(String msg) { - logMsg(IStatus.WARNING, msg, null); - } - - /** - * Logs the given warning message and exception. - * - * @param msg - * The warning message. - * @param ex - * The exception. - */ - public void logWarning(String msg, Throwable ex) { - logMsg(IStatus.WARNING, msg, ex); - } - - /** - * Logs the given status message and exception. - * - * @param msg - * The status message. - */ - public void logInfo(String msg) { - logMsg(IStatus.INFO, msg, null); - } - - /** - * Logs the given message and exception. - * - * @param severity - * The severity. - * @param msg - * The message. - * @param ex - * The exception. - */ - public synchronized void logMsg(int severity, String msg, Throwable ex) { - if (msg == null && ex != null) { - msg = ex.getMessage(); - } - - if (msg == null) { - msg = ""; //$NON-NLS-1$ - } - - Status status = new Status(severity, pluginId, IStatus.OK, msg, ex); - - // Call the Eclipse Logger. - plugin.getLog().log(status); - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/package.html deleted file mode 100644 index 7aed6dede63..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/serviceability/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides common error handling, logging and versioning services. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ExtensionHelper.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ExtensionHelper.java deleted file mode 100644 index 2745046f8c6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ExtensionHelper.java +++ /dev/null @@ -1,216 +0,0 @@ -//------------------------------------------------------------------------------ -//Copyright (c) 2005, 2008 IBM Corporation 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 -//http://www.eclipse.org/legal/epl-v10.html -// -//Contributors: -//IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import org.eclipse.epf.common.CommonPlugin; -import org.eclipse.epf.common.IHTMLFormatter; -import org.eclipse.epf.common.IHTMLParser; -import org.osgi.framework.Bundle; - -/** -* Helper class with methods to retrieve extensions -* Moved part of org.eclipse.epf.library.edit.util.ExtensionManager, to allow -* access by classes that have no dependency on org.eclipse.epf.library.edit -* -* @author Phong Nguyen Le -* @author Weiping Lu -* @since 1.5 -*/ -public class ExtensionHelper { - private static Map IDToExtensionMap = new HashMap(); - - public static Object createExtension(String namespace, String extensionPointName) { - // Process the contributors. - // - IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); - IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(namespace, extensionPointName); - if (extensionPoint != null) { - IExtension[] extensions = extensionPoint.getExtensions(); - Object ext = null; - ext_walk: - for (int i = 0; i < extensions.length; i++) { - IExtension extension = extensions[i]; - String pluginId = extension.getNamespaceIdentifier(); - Bundle bundle = Platform.getBundle(pluginId); - IConfigurationElement[] configElements = extension - .getConfigurationElements(); - for (int j = 0; j < configElements.length; j++) { - IConfigurationElement configElement = configElements[j]; - try { - String className = configElement.getAttribute("class"); //$NON-NLS-1$ - if(className != null) { - ext = bundle.loadClass(className).newInstance(); - break ext_walk; - } - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - } - } - return ext; - } - return null; - } - - public static Object getExtension(String namespace, String extensionPointName) { - String ID = namespace + '.' + extensionPointName; - Object ext = IDToExtensionMap.get(ID); - if(ext == null) { - synchronized (IDToExtensionMap) { - ext = IDToExtensionMap.get(ID); - if(ext == null) { - ext = createExtension(namespace, extensionPointName); - if(ext != null) { - IDToExtensionMap.put(ID, ext); - } - } - } - - } - return ext; - } - - /** - * This is a special method to handle JTidy extensions - * - */ - public static Object createExtensionForJTidy(String namespace, String extensionPointName) { - List formaters = new ArrayList(); - List parsers = new ArrayList(); - - IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); - IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(namespace, extensionPointName); - if (extensionPoint != null) { - IExtension[] extensions = extensionPoint.getExtensions(); - for (int i = 0; i < extensions.length; i++) { - IExtension extension = extensions[i]; - String pluginId = extension.getNamespaceIdentifier(); - Bundle bundle = Platform.getBundle(pluginId); - IConfigurationElement[] configElements = extension.getConfigurationElements(); - for (int j = 0; j < configElements.length; j++) { - IConfigurationElement configElement = configElements[j]; - try { - String className = configElement.getAttribute("class"); //$NON-NLS-1$ - if(className != null) { - Object obj = bundle.loadClass(className).newInstance(); - if (extensionPointName.equals("htmlFormatter")) { //$NON-NLS-1$ - formaters.add((IHTMLFormatter)obj); - } else if (extensionPointName.equals("htmlParser")) { //$NON-NLS-1$ - parsers.add((IHTMLParser)obj); - } - } - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - } - } - - if (formaters.size() > 0) { - if (formaters.size() == 1) { - return formaters.get(0); - } - return selectExtension(formaters); - } else if (parsers.size() > 0) { - if (parsers.size() == 1) { - return parsers.get(0); - } - return selectExtension(parsers); - } - } - - return null; - } - - private static Object selectExtension(List objs) { - for (Object obj : objs) { - String name = obj.getClass().getName(); - if (!(name.equals("org.eclipse.epf.common.html.DefaultHTMLFormatter") //$NON-NLS-1$ - || name.equals("org.eclipse.epf.common.html.DefaultHTMLParser"))) { //$NON-NLS-1$ - return obj; - } - } - - return null; - } - - public static IMarkerAttributeContributer getMarkerAttributeContributer() { - IMarkerAttributeContributer ret = (IMarkerAttributeContributer) getExtension( - CommonPlugin.getDefault().getId(), "markerAttributeContributer");//$NON-NLS-1$ - return ret; - } - - /** - * Create object based on type and context through extension - * @param type - * @param context - * @return created object or null if no extension is found - */ - public static Object create(Class type, Object context) { - IObjectFactory ret = (IObjectFactory) getExtension( - CommonPlugin.getDefault().getId(), "objectFactory");//$NON-NLS-1$ - if (ret == null) { - return null; - } - return ret.create(type, context); - } - - public static List getExtensions(String namespace, String extensionPointName, Class type) { - List list = new ArrayList(); - try { - IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); - IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(namespace, extensionPointName); - if (extensionPoint != null) { - IExtension[] extensions = extensionPoint.getExtensions(); - for (int i = 0; i < extensions.length; i++) { - IExtension extension = extensions[i]; - String pluginId = extension.getNamespaceIdentifier(); - Bundle bundle = Platform.getBundle(pluginId); - IConfigurationElement[] configElements = extension - .getConfigurationElements(); - for (int j = 0; j < configElements.length; j++) { - IConfigurationElement configElement = configElements[j]; - try { - String className = configElement.getAttribute("class"); //$NON-NLS-1$ - if(className != null) { - Object ext = bundle.loadClass(className).newInstance(); - if(type.isInstance(ext)) { - list.add((T)ext); - } - } - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - } - } - } - } - catch(Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - if(list.isEmpty()) { - return Collections.emptyList(); - } - return list; - } - - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java deleted file mode 100644 index bf8c51b2e74..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/FileUtil.java +++ /dev/null @@ -1,1285 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.URL; -import java.nio.CharBuffer; -import java.nio.MappedByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; -import java.nio.channels.OverlappingFileLockException; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CodingErrorAction; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Enumeration; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.epf.common.CommonPlugin; -import org.osgi.framework.Bundle; - -/** - * Utility class for managing directories and files. - * - * @author Kelvin Low - * @author Jinhua Xi - * @since 1.0 - */ -public class FileUtil { - - /** - * Platform-specific line separator. - */ - public static final String LINE_SEP = System.getProperty("line.separator"); //$NON-NLS-1$ - - /** - * Platform-specific file separator. - */ - public static final String FILE_SEP = System.getProperty("file.separator"); //$NON-NLS-1$ - - /** - * Platform-specific line separator length. - */ - public static final int LINE_SEP_LENGTH = LINE_SEP.length(); - - /** - * UNC path prefix. - */ - public static final String UNC_PATH_PREFIX = "\\\\"; //$NON-NLS-1$ - - /** - * UNC path prefix length. - */ - public static final int UNC_PATH_PREFIX_LENGTH = UNC_PATH_PREFIX.length(); - - /** - * ISO-8859-1 encoding. - */ - public static final String ENCODING_ISO_8859_1 = "ISO-8859-1"; //$NON-NLS-1$ - - /** - * UTF-8 encoding. - */ - public static final String ENCODING_UTF_8 = "UTF-8";//$NON-NLS-1$ - - private static Map copiedFileMap; - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private FileUtil() { - } - - /** - * Returns the absolute path for a file or directory. - * - * @param file - * a file or directory - * @return the absolute path to the file or directory - */ - public static String getAbsolutePath(File file) { - return file.getAbsolutePath().replace('\\', '/'); - } - - /** - * Returns the absolute path for a file or directory. - * - * @param path - * a path to a file or directory - * @return an absolute path to the file or directory - */ - public static String getAbsolutePath(String path) { - return getAbsolutePath(new File(path)); - } - - /** - * Returns the absolute path for a URL. - * - * @param url - * a URL - * @return the absolute path of the URL - */ - public static String getAbsolutePath(URL url) { - String pathName = url.getFile().substring(1); - String result = NetUtil.decodeUrl(pathName, null); - return result; - } - - /** - * Returns the parent directory of a path. - * - * @param path - * a path name - * @return the name of the parent directory - */ - public static String getParentDirectory(String path) { - return (new File(path)).getParent(); - } - - /** - * Returns the file name and extension from a path. - * - * @param path - * a path name - * @return the file name including the file extension - */ - public static String getFileName(String path) { - return getFileName(path, true); - } - - /** - * Returns the file name from a path, with or without the file extension. - * - * @param path - * a path name - * @param withExtension - * if true, include the file extension in the - * result - * @return the file name with or without the file extension - */ - public static String getFileName(String path, boolean withExtension) { - String normalizedPath = path.replace('\\', '/'); - - int prefixLength = 0; - if (normalizedPath.startsWith(NetUtil.FILE_URI_PREFIX)) { - prefixLength = NetUtil.FILE_URI_PREFIX_LENGTH; - } else if (normalizedPath.startsWith(NetUtil.HTTP_URI_PREFIX)) { - prefixLength = NetUtil.HTTP_URI_PREFIX_LENGTH; - } - - String fileName; - int index = normalizedPath.lastIndexOf("/"); //$NON-NLS-1$ - if (index < prefixLength) { - fileName = normalizedPath.substring(prefixLength); - } else { - fileName = path.substring(index + 1); - } - - if (withExtension) { - return fileName; - } - - index = fileName.indexOf("."); //$NON-NLS-1$ - return (index > 0) ? fileName.substring(0, index) : fileName; - } - - /** - * Returns the relative path of a path from a base path. - * - * @param path - * a path - * @param basePath - * the base path - * @return a relative path - */ - public static String getRelativePathToBase(File path, File basePath) { - try { - String dir = path.toURL().toExternalForm(); - String baseDir = basePath.toURL().toExternalForm(); - StringBuffer result = new StringBuffer(); - if (dir.indexOf(baseDir) == 0) { - String delta = dir.substring(baseDir.length()); - for (int i = 0; i < delta.length(); i++) { - if (delta.charAt(i) == '/') { - result.append("../"); //$NON-NLS-1$ - } - } - } - return result.toString(); - } catch (Exception e) { - return ""; //$NON-NLS-1$ - } - } - - public static String getRelativePath(File path, File basePath) { - try { - String dir = path.toURL().toExternalForm(); - String baseDir = appendSeparator(basePath.toURL().toExternalForm(), - "/"); //$NON-NLS-1$ - StringBuffer result = new StringBuffer(); - while (dir.indexOf(baseDir) == -1) { - basePath = basePath.getParentFile(); - baseDir = appendSeparator(basePath.toURL().toExternalForm(), - "/"); //$NON-NLS-1$ - result.append("../"); //$NON-NLS-1$ - } - if (dir.indexOf(baseDir) == 0) { - String delta = dir.substring(baseDir.length()); - result.append(delta); - } - return result.toString(); - } catch (Exception e) { - return ""; //$NON-NLS-1$ - } - } - - /** - * Appends the platform specific path separator to the end of a path. - * - * @param path - * a path name - * @return the path name appended with the platform specific path separator - */ - public static String appendSeparator(String path) { - return appendSeparator(path, File.separator); - } - - /** - * Appends the given path separator to the end of a path - * - * @param path - * a path name - * @param separator - * a path separator - * @return the path name appended with the given separator - */ - public static String appendSeparator(String path, String separator) { - return path.endsWith(separator) ? path : path + separator; - } - - /** - * Removes the ending path separator from a path. - * - * @param path - * a path name - * @return the path name minus the platform specific path separator - */ - public static String removeSeparator(String path) { - return path.endsWith(File.separator) ? path.substring(0, - path.length() - 1) : path; - } - - /** - * Removes the ending path separator from a path. - * - * @param path - * a path name - * @return the path name minus the path separator "\\" or "/" - */ - public static String removeAllSeparator(String path) { - return path.endsWith("/") || path.endsWith("\\") ? path.substring(0, path.length() - 1) : path; //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * Removes the ending path separator from a path. - * - * @param path - * a path name - * @param separator - * a path separator - * @return the path name minus the separator - */ - public static String removeSeparator(String path, String separator) { - return path.endsWith(separator) ? path.substring(0, path.length() - 1) - : path; - } - - /** - * Replaces the file name with another in a path. - * - * @param path - * a path name - * @param oldFileName - * the old file name - * @param newFileName - * the new file name - * @return the new path name with the new file name - */ - public static String replaceFileName(String path, String oldFileName, - String newFileName) { - int index = path.lastIndexOf(oldFileName); - return path.substring(0, index) + newFileName; - } - - /** - * Replaces the file extension with another in a path. - * - * @param path - * a path name - * @param oldFileExt - * rhe old file extension - * @param newFileExt - * the new file extension - * @return the new path with the new file extension - */ - public static String replaceExtension(String path, String oldExt, - String newExt) { - int index = path.lastIndexOf(oldExt); - return path.substring(0, index) + newExt; - } - - /** - * Returns the locale-specific path of a base path. - * - * @param path - * a base path name - * @param localeStr - * a locale string - * @return the locale-specific path - */ - public static String getLocalePath(String path, String localeStr) { - if (StrUtil.isBlank(localeStr)) { - return path; - } - String fileName = getFileName(path); - return replaceFileName(path, fileName, localeStr + "/" + fileName); //$NON-NLS-1$ - } - - /** - * Returns the locale-specific path of a base path. - * - * @param path - * a base path name - * @param locale - * a locale object - * @return the locale-specific path - */ - public static String getLocalePath(String path, Locale locale) { - return locale == null ? path : getLocalePath(path, locale.toString()); - } - - /** - * Writes the given text to a text file. - * - * @param fileName - * the target file name - * @param text - * the text to write - * @return true if the given text is written successfully to - * file - */ - public static boolean writeFile(String filename, String text) { - FileWriter writer = null; - try { - writer = new FileWriter(filename); - writer.write(text); - writer.flush(); - } catch (IOException e) { - } finally { - if (writer != null) { - try { - writer.close(); - return true; - } catch (Exception e) { - } - } - } - return false; - } - - /** - * Write the given text to a file with UTF-8 encoding. - * - * @param fileName - * the target file name - * @param text - * the text to write - * @param append - * if true, append the text to the end of the - * file, if false, override the file - * @return true if the given text is written successfully to - * file - */ - public static boolean writeUTF8File(String filename, String text) { - return writeUTF8File(filename, text, false); - } - - /** - * Write the given text to a file with UTF-8 encoding. - * - * @param fileName - * the target file name - * @param text - * the text to write - * @param append - * if true, append the text to the end of the - * file, if false, override the file - * @return true if the given text is written successfully to - * file - */ - public static boolean writeUTF8File(String filename, String text, - boolean append) { - OutputStreamWriter writer = null; - FileOutputStream fileOut = null; - try { - fileOut = new FileOutputStream(filename, append); - writer = new OutputStreamWriter(fileOut, ENCODING_UTF_8); - writer.write(text); - writer.flush(); - fileOut.flush(); - } catch (IOException e) { - CommonPlugin.getDefault().getLogger().logError(e); - } finally { - if (writer != null) { - try { - writer.close(); - return true; - } catch (Exception e) { - } - } - if (fileOut != null) { - try { - fileOut.close(); - return true; - } catch (Exception e) { - } - } - } - return false; - } - - /** - * Write the content of the given URI to an output stream. - * - * @param uri - * the source URI - * @param output - * the output stream - */ - public static void writeFile(String uri, OutputStream output) - throws IOException { - if (uri == null) { - return; - } - - InputStream input = null; - try { - input = NetUtil.getInputStream(uri); - int bytesRead; - byte[] buf = new byte[4096]; - while ((bytesRead = input.read(buf, 0, 4096)) > 0) { - output.write(buf, 0, bytesRead); - } - output.flush(); - } finally { - if (input != null) { - try { - input.close(); - } catch (Exception e) { - } - } - } - } - - /** - * Write the content of the given URI to a PrintWriter. - * - * @param uri - * the source URI - * @param writer - * the PrintWriter object - */ - public static void writeFile(String uri, PrintWriter pw) throws IOException { - if (uri == null) { - return; - } - - InputStreamReader input = null; - try { - input = new InputStreamReader(NetUtil.getInputStream(uri)); - int charsRead; - char[] buf = new char[4096]; - while ((charsRead = input.read(buf, 0, 4096)) > 0) { - pw.write(buf, 0, charsRead); - } - pw.flush(); - } finally { - if (input != null) { - try { - input.close(); - } catch (Exception e) { - } - } - } - } - - /** - * Recursively delete all sub-directories and files in a directory except - * for the directory itself. - * - * @param dir - * the directory containing the sub-directories and files - * @return true if the delete operation is successful - */ - public static boolean deleteAllFiles(String dir) { - boolean ret = true; - File targetDir = new File(dir); - File[] files = targetDir.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - if (files[i].isDirectory()) { - ret = ret && deleteAllFiles(files[i].getAbsolutePath()); - } - ret = ret && files[i].delete(); - } - } - - return ret; - } - - public static boolean deleteTree(File file) { - boolean ret = true; - - if (file.isDirectory()) { - File[] files = file.listFiles(); - if (files != null) { - for (File f : files) { - if (!deleteTree(f)) { - ret = false; - } - } - } - } - - if (!file.delete()) { - ret = false; - } - - return ret; - } - - /** - * Recursively delete all sub-directories and files in a directory except - * for the directory itself and the specified file. - * - * @param dir - * the directory containing the sub-directories and files - * @param filesNotToDelete - * a list of files and/or directories that should not be deleted - * @return true if delete operation is successful - */ - public static boolean deleteAllFiles(String dir, List filesNotToDelete) { - boolean ret = true; - File targetDir = new File(dir); - File[] files = targetDir.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - if (!filesNotToDelete.contains(files[i])) { - if (files[i].isDirectory()) { - ret = ret - && deleteAllFiles(files[i].getAbsolutePath(), - filesNotToDelete); - } - ret = ret && files[i].delete(); - } - } - } - - return ret; - } - - /** - * Copies the content of the source file to the target file. Will overwrite - * an existing file if it has write permission - * - * @param srcFile - * the source file or path - * @param tgtFile - * the target file or path - */ - public static boolean copyFile(File srcFile, File tgtFile) { - Map map = getCopiedFileMap(); - File keyFile = null; - File valFile = null; - if (map != null) { - try { - keyFile = tgtFile.getCanonicalFile(); - valFile = srcFile.getCanonicalFile(); - if (valFile.equals(map.get(keyFile))) { - return true; - } - } catch (Exception e) { - keyFile = valFile = null; - } - } - - try { - boolean ret = copyfile(srcFile, tgtFile); - if (map != null && keyFile != null && valFile != null) { - map.put(keyFile, valFile); - } - return ret; - } catch (IOException ex) { - CommonPlugin.getDefault().getLogger().logError(ex); - return false; - } - } - - /** - * Copies the content of the source file to the target file. - * - * @param srcFileName - * the source file name - * @param tgtFileName - * the target file name - */ - public static boolean copyFile(String srcFileName, String tgtFileName) { - return copyFile(new File(srcFileName), new File(tgtFileName)); - } - - /** - * Copies one file to another. - *

- * If both source and destination are directories, delegates to - * copydirectory(). - *

- * source must exist and be readable - *

- * cannot copy a directory to a file - *

- * will not copy if timestamps and filesize match, will overwrite otherwise - * - * @param source - * the source file - * @param dest - * the destination file - * @throws IOException - * if an error occurs during the copy operation - */ - private static boolean copyfile(File source, File dest) throws IOException { - if (source.equals(dest)) - // do not copy equal files - return false; - - if (!source.exists() || !source.canRead()) { - // source does not exist or can't read - return false; - } - - if (dest.exists() && !dest.canWrite()) { - // dest exists and cannot be written - return false; - } - - if (source.isDirectory()) { - if (dest.isFile()) { - // can't copy a directory to a file - return false; - } else { - // delegate to copydirectory - return copydirectory(source, dest); - } - } else { - // source is a file - if (dest.isDirectory()) { - String sourceFileName = source.getName(); - return copyfile(source, new File(dest, sourceFileName)); - } - // both source and dest are files - boolean needCopy = true; - if (dest.exists()) { - needCopy = (dest.lastModified() != source.lastModified()) - || (dest.length() != source.length()); - } - - if (needCopy) { - FileInputStream input = null; - FileOutputStream output = null; - - try { - input = new FileInputStream(source); - FileChannel in = input.getChannel(); - if (!dest.exists()) { - dest.getParentFile().mkdirs(); - } - output = new FileOutputStream(dest); - FileChannel out = output.getChannel(); - out.transferFrom(in, 0, source.length()); - dest.setLastModified(source.lastModified()); - return true; - } finally { - if (input != null) { - try { - input.close(); - } catch (IOException e) { - } - } - if (output != null) { - try { - output.close(); - } catch (IOException e) { - } - } - } - } else { - // did not copy - // return true because dest file is same as source - return true; - } - } - } - - /** - * Copies the content of a directory to another directory. - * - * @param srcDirName - * the source directory name - * @param tgtDirName - * the target directory name - */ - public static boolean copyDir(File srcDir, File tgtDir) { - try { - return copydirectory(srcDir, tgtDir); - } catch (IOException ex) { - CommonPlugin.getDefault().getLogger().logError(ex); - return false; - } - } - - /** - * Copies the content of a directory to another directory. - * - * @param srcDirName - * the source directory name - * @param tgtDirName - * the target directory name - */ - public static boolean copyDir(String srcDirName, String tgtDirName) { - return copyDir(new File(srcDirName), new File(tgtDirName)); - } - - /** - * Copies one directory to another - operates ONLY on directories. - *

- * Both source and dest must exist. - */ - private static boolean copydirectory(File sourceDir, File destDir) - throws IOException { - if (!sourceDir.exists() || !destDir.exists()) { - return false; - } - - if (!sourceDir.isDirectory() || !destDir.isDirectory()) { - return false; - } - - File[] files = sourceDir.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - // calc destination name - String destName = destDir - + File.separator - + files[i].getAbsolutePath().substring( - sourceDir.getAbsolutePath().length() + 1); - if (files[i].isFile()) { - // copy the file - copyfile(files[i], new File(destName)); - } else if (files[i].isDirectory()) { - // copy directory recursively - File destFile = new File(destName); - destFile.mkdirs(); - copydirectory(files[i], destFile); - } - } - } - return true; - } - - // for some reason, this guy locks the file, if you try to update the file, - // got the following exception - // java.io.FileNotFoundException: - // (The requested operation cannot be performed on a file with a user-mapped - // section open) - // need to handle later - public static CharBuffer readFile(File file) throws IOException { - FileInputStream input = null; - CharBuffer charBuffer = null; - try { - input = new FileInputStream(file); - FileChannel inChannel = input.getChannel(); - int length = (int) inChannel.size(); - MappedByteBuffer byteBuffer = inChannel.map( - FileChannel.MapMode.READ_ONLY, 0, length); - Charset charset = Charset.forName(ENCODING_ISO_8859_1); - CharsetDecoder decoder = charset.newDecoder(); - charBuffer = decoder.decode(byteBuffer); - } finally { - if (input != null) { - try { - input.close(); - } catch (IOException e) { - } - } - } - return charBuffer; - } - - public static String readInputStream(InputStream input) throws IOException { - String result = ""; //$NON-NLS-1$ - byte[] readData = new byte[8 * 1024]; - try { - int bytesRead = 0; - while ( (bytesRead = input.read(readData)) > 0) { - result += new String(readData, 0, bytesRead); - } - } finally { - if (input != null) { - try { - input.close(); - } catch (IOException e) { - } - } - } - return result; - } - - public static StringBuffer readFile(File file, String encoding) - throws IOException { - - StringBuffer result = new StringBuffer(); - FileInputStream fis = null; - InputStreamReader reader = null; - int size; - try { - Charset cs = Charset.forName(encoding); - CharsetDecoder csd = cs.newDecoder(); - csd.onMalformedInput(CodingErrorAction.REPLACE); - char[] buffer = new char[1024]; - fis = new FileInputStream(file); - reader = new InputStreamReader(fis, csd); - while ((size = reader.read(buffer, 0, 1024)) > 0) { - result.append(buffer, 0, size); - } - } catch (Exception e) { - // System.out.println(encoding); - e.printStackTrace(); - } finally { - if (fis != null) { - fis.close(); - } - - if (reader != null) { - reader.close(); - } - } - - return result; - } - - public static long getSize(File file) { - FileInputStream fis = null; - try { - fis = new FileInputStream(file); - return fis.getChannel().size(); - } - catch (IOException e) { - // - } - finally { - try { - fis.close(); - } - catch(Exception e) { - // - } - } - return -1; - } - - /** - * Uses Java 1.4's FileLock class to test for a file lock - * - * @param file - * @return - */ - public static boolean isFileLocked(File file) { - boolean isLocked = false; - FileOutputStream input = null; - FileLock lock = null; - - if (!file.exists()) { - return false; - } - try { - input = new FileOutputStream(file); - FileChannel fileChannel = input.getChannel(); - - lock = fileChannel.tryLock(); - - if (lock == null) - isLocked = true; - else - lock.release(); - } catch (Exception e) { - if (e instanceof SecurityException) - // Can't write to file. - isLocked = true; - else if (e instanceof FileNotFoundException) - isLocked = false; - else if (e instanceof IOException) - isLocked = true; - // OverlappingFileLockException means that this JVM has it locked - // therefore it is not locked to us - else if (e instanceof OverlappingFileLockException) - isLocked = false; - // Could not get a lock for some other reason. - else - isLocked = true; - } finally { - if (input != null) { - try { - input.close(); - } catch (Exception ex) { - } - } - } - return isLocked; - } - - /** - * Locks a file for the current JVM. Will create the file if it does not - * exist - * - * @param file - * @return a FileLock object, or null if file could not be locked - */ - public static FileLock lockFile(File file) { - FileOutputStream input = null; - FileLock lock = null; - try { - input = new FileOutputStream(file); - FileChannel fileChannel = input.getChannel(); - lock = fileChannel.tryLock(); - - if (lock.isValid()) - return lock; - } catch (Exception e) { - // Could not get a lock for some reason. - return null; - } finally { - try { - if (input != null && (lock == null || !lock.isValid())) { - input.close(); - } - } catch (Exception ex) { - } - } - return null; - } - - /** - * Gets all files in a specified path. - * - * @param path - * absolute path of a folder - * @param fileList - * a list to collect the files - * @param recursive - * if true, find the files in sub folders as well - */ - public static void getAllFiles(File path, List fileList, - boolean recursive) { - if (path.isDirectory()) { - File[] files = path.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - if (files[i].isFile()) { - fileList.add(files[i]); - } else if (recursive) { - getAllFiles(files[i], fileList, recursive); - } - } - } - } - } - - /** - * Given a directory and extension, returns all files (recursively) whose - * extension starts with a given extension. - * - * @param file - * a directory - * @param extension - * a file extension - * @return a colleciton of File with the given extension - */ - public static List fileList(File f, String extension) { - extension = extension.toUpperCase(); - List returnList = new ArrayList(); - try { - if (f.isDirectory()) { - String[] flist = f.list(); - for (int i = 0; i < flist.length; ++i) { - File fc = new File(f.getPath(), flist[i]); - returnList.addAll(fileList(fc, extension)); - } - } else { - if (extension != null) { - String name = f.getName().toUpperCase(); - if (name.lastIndexOf(".") != -1) //$NON-NLS-1$ - if (name - .substring(name.lastIndexOf(".") + 1).startsWith(extension)) { //$NON-NLS-1$ - returnList.add(f); - } - } else - returnList.add(f); - } - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - return returnList; - } - - /** - * Given a directory and extension, returns all files (recursively) whose - * extension does not starts with a given extension. - * - * @param file - * a directory - * @param extension - * a file extension - * @return a colleciton of File without the given extension - */ - public static List fileListExcludeExt(File f, String extension) { - List returnList = new ArrayList(); - try { - if (f.isDirectory()) { - String[] flist = f.list(); - for (int i = 0; i < flist.length; ++i) { - File fc = new File(f.getPath(), flist[i]); - returnList.addAll(fileListExcludeExt(fc, extension)); - } - } else { - if (extension != null) { - String name = f.getName(); - if (name.lastIndexOf(".") != -1) //$NON-NLS-1$ - if (!(name.substring(name.lastIndexOf(".") + 1).startsWith(extension))) { //$NON-NLS-1$ - returnList.add(f); - } - } else - returnList.add(f); - } - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - return returnList; - } - - /** - * Gets all file paths in the specified path. - * - * @param path, - * absolute path of a folder - * @param recursive - * if true, find the files in sub folders as well - */ - public static ArrayList getAllFileAbsolutePaths(File path, - boolean recursive) { - ArrayList files = new ArrayList(); - getAllFiles(path, files, recursive); - ArrayList paths = new ArrayList(); - for (int i = 0; i < files.size(); i++) { - String absPath = ((File) files.get(i)).getAbsolutePath(); - paths.add(absPath); - } - return paths; - } - - /** - * Moves a file from a directory to another. - *

- * Attempts to rename the file first. If that fails, will copy the - * sourceFile to destFile and delete the sourceFile. - * - * @param sourceFile - * the source file - * @param destFile - * the destination file - * @return - */ - public static boolean moveFile(File sourceFile, File destFile) { - try { - doMoveFile(sourceFile, destFile); - return true; - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - return false; - } - } - - public static void doMoveFile(File sourceFile, File destFile) throws IOException { - // Try to rename the source file to the destination file. - if (!sourceFile.renameTo(destFile)) { - // Try to copy the source file to the destination file and - // delete - // the source file. - copyfile(sourceFile, destFile); - sourceFile.delete(); - } - } - - private static Map getCopiedFileMap() { - return copiedFileMap; - } - - public static void setCopiedFileMap(Map copiedFileMap) { - FileUtil.copiedFileMap = copiedFileMap; - } - - - /** - * Unzips the contents of a zip file to a directory - * - * @param zipfile - * source zip file - * @param tgtDir - * target directory - */ - public static boolean unzip(File srcZipFile, File tgtDir) { - if (! srcZipFile.exists() || ! tgtDir.exists()) { - return false; - } - - if (! tgtDir.isDirectory()) { - return false; - } - - try { - ZipFile zipFile = new ZipFile(srcZipFile); - Enumeration entries = zipFile.entries(); - - while (entries.hasMoreElements()) { - ZipEntry entry = (ZipEntry) entries.nextElement(); - - File tgtFile = new File(tgtDir, entry.getName()); - - if (entry.isDirectory() && ! tgtFile.exists()) { - tgtFile.mkdirs(); - - } else { - File parentFolder = tgtFile.getParentFile(); - if (! parentFolder.exists()) { - parentFolder.mkdirs(); - } - - copyInputStream(zipFile.getInputStream(entry), - new BufferedOutputStream(new FileOutputStream( - new File(tgtDir, entry.getName())))); - } - } - - zipFile.close(); - } catch (IOException ioe) { - return false; - } - return false; - } - - private static final void copyInputStream(InputStream in, OutputStream out) - throws IOException { - byte[] buffer = new byte[1024]; - int len; - - while ((len = in.read(buffer)) >= 0) - out.write(buffer, 0, len); - - in.close(); - out.close(); - } - - public static class FileChecker { - public IStatus syncExecCheckModify(List modifiedFiles) { - return Status.OK_STATUS; - } - } - - private static FileChecker fileChecker; - private static void loadDeafultFileChecker() { - if (fileChecker != null) { - return; - } - Bundle bundle = Platform.getBundle("org.eclipse.epf.import"); - try { - bundle.start(); - } catch (Exception e) { - } - } - public static void setFileChecker(FileChecker fileChecker) { - FileUtil.fileChecker = fileChecker; - } - - public static IStatus syncExecCheckModify(List modifiedFiles) { - loadDeafultFileChecker(); - if (fileChecker != null) { - return fileChecker.syncExecCheckModify(modifiedFiles); - } - return Status.OK_STATUS; - } - - public static boolean binaryEqual(File f1, File f2) { - BufferedInputStream is1 = null; - BufferedInputStream is2 = null; - - int bufSz = 1024; - byte buff1[] = new byte[bufSz]; - byte buff2[] = new byte[bufSz]; - - try { - is1 = new BufferedInputStream(new FileInputStream(f1)); - is2 = new BufferedInputStream(new FileInputStream(f2)); - - int read1 = -1; - int read2 = -1; - - do { - int offset1 = 0; - while (offset1 < bufSz - && (read1 = is1.read(buff1, offset1, bufSz - offset1)) >= 0) { - offset1 += read1; - } - - int offset2 = 0; - while (offset2 < bufSz - && (read2 = is2.read(buff2, offset2, bufSz - offset2)) >= 0) { - offset2 += read2; - } - if (offset1 != offset2) - return false; - if (offset1 != bufSz) { - Arrays.fill(buff1, offset1, bufSz, (byte) 0); - Arrays.fill(buff2, offset2, bufSz, (byte) 0); - } - if (!Arrays.equals(buff1, buff2)) - return false; - } while (read1 >= 0 && read2 >= 0); - if (read1 < 0 && read2 < 0) - return true; - return false; - - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - return false; - } - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/I18nUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/I18nUtil.java deleted file mode 100644 index 9758975d8e3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/I18nUtil.java +++ /dev/null @@ -1,219 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.File; -import java.text.MessageFormat; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * Helper utiltiies for handling internationalization. - * - * @author Kelvin Low - * @since 1.0 - */ -public class I18nUtil { - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private I18nUtil() { - } - - /** - * Returns the localized string associated with a resource key. - * - * @param resourceBundle - * A resource bundle. - * @param key - * A resource key. - * @return A localized string. - */ - public static String getString(ResourceBundle resourceBundle, String key) { - if (resourceBundle != null) { - try { - return resourceBundle.getString(key); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the localized string associated with a resource key and formatted - * with a given string. - * - * @param resourceBundle - * A resource bundle. - * @param key - * A resource key. - * @param data - * An object. - * @return A formatted localized string. - */ - public static String formatString(ResourceBundle resourceBundle, - String key, Object data) { - if (resourceBundle != null) { - try { - String localizedStr = resourceBundle.getString(key); - return MessageFormat - .format(localizedStr, new Object[] { data }); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the localized string associated with a resource key and formatted - * with two given string. - * - * @param resourceBundle - * A resource bundle. - * @param key - * A resource key. - * @param data1 - * An object. - * @param data2 - * An object. - * @return A formatted localized string. - */ - public static String formatString(ResourceBundle resourceBundle, - String key, Object data1, Object data2) { - if (resourceBundle != null) { - try { - String localizedStr = resourceBundle.getString(key); - return MessageFormat.format(localizedStr, new Object[] { data1, - data2 }); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the localized string associated with a resource key and formatted - * with a given string. - * - * @param resourceBundle - * A resource bundle. - * @param key - * A resource key. - * @param data - * An array of objects. - * @return A formatted localized string. - */ - public static String formatString(ResourceBundle resourceBundle, - String key, Object[] data) { - if (resourceBundle != null) { - try { - String localizedStr = resourceBundle.getString(key); - return MessageFormat.format(localizedStr, data); - } catch (MissingResourceException e) { - } - } - return '[' + key + ']'; - } - - /** - * Returns the localized integer value associated with a resource key. - * - * @param resourceBundle - * A resource bundle. - * @param key - * A resource key. - * @param defaultValue - * The default value to return if the resource key cannot be - * located. - * @return A localized interger value. - */ - public static int getInt(String intString, - int defaultValue) { - try { - if (intString != null) { - return Integer.parseInt(intString); - } - } catch (Exception e) { - } - return defaultValue; - } - - /** - * Returns the localized version of a US English resource file. - * - * @param path - * The absolute path to a resource file. - * @param locale - * A locale. - * @return The localized resource file. If none exists, return null. - */ - public static String getLocalizedFile(String path, Locale locale) { - if (locale.equals(Locale.US) || path == null) { - return null; - } - - // Build the locale string array. This is used to construct the - // localized file names. - String language = locale.getLanguage(); - String country = locale.getCountry(); - String variant = locale.getVariant(); - - String[] localeStrs = new String[3]; - if (variant != null && variant.length() > 0) { - localeStrs[0] = locale.toString(); - } - if (country != null && country.length() > 0) { - localeStrs[1] = language + "_" + country; //$NON-NLS-1$ - } - if (language != null) { - localeStrs[2] = language; - } - - String dir = path.replace('\\', '/'); - String fileName; - - int pathIndex = dir.lastIndexOf("/"); //$NON-NLS-1$ - if (pathIndex > 0) { - dir = path.substring(0, pathIndex + 1); - fileName = path.substring(pathIndex + 1); - } else { - fileName = dir; - dir = ""; //$NON-NLS-1$ - } - - String fileExt = ""; //$NON-NLS-1$ - int extIndex = fileName.lastIndexOf("."); //$NON-NLS-1$ - if (extIndex > 0) { - fileExt = fileName.substring(extIndex); - fileName = fileName.substring(0, extIndex); - } - - fileName = dir + fileName + "_"; //$NON-NLS-1$ - - // Look for the localized file. - for (int i = 0; i < 3; i++) { - if (localeStrs[i] != null) { - // Gets the localized path name. - String fname = fileName + localeStrs[i] + fileExt; - File file = new File(fname); - if (file.exists()) { - return fname; - } - } - } - - return null; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IMarkerAttributeContributer.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IMarkerAttributeContributer.java deleted file mode 100644 index ceba9ebd156..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IMarkerAttributeContributer.java +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -//Copyright (c) 2005, 2008 IBM Corporation 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 -//http://www.eclipse.org/legal/epl-v10.html -// -//Contributors: -//IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import org.eclipse.core.resources.IMarker; - -/** -* Interface for adding additional attributes to markers -* -* @author Weiping Lu -* @since 1.5 -*/ -public interface IMarkerAttributeContributer { - - void addAddtionalAttributes(IMarker marker, Object context); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IObjectFactory.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IObjectFactory.java deleted file mode 100644 index 21d93d3e722..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/IObjectFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -//Copyright (c) 2005, 2008 IBM Corporation 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 -//http://www.eclipse.org/legal/epl-v10.html -// -//Contributors: -//IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -/** -* Interface to create object based on type and context -* -* @author Weiping Lu -* @since 1.5 -*/ -public interface IObjectFactory { - - Object create(Class type, Object context); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ImageUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ImageUtil.java deleted file mode 100644 index 9af9c4fb740..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ImageUtil.java +++ /dev/null @@ -1,179 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.awt.Color; -import java.awt.Component; -import java.awt.Font; -import java.awt.Graphics2D; -import java.awt.Image; -import java.awt.MediaTracker; -import java.awt.font.FontRenderContext; -import java.awt.font.LineBreakMeasurer; -import java.awt.font.TextAttribute; -import java.awt.font.TextLayout; -import java.awt.geom.Point2D; -import java.awt.image.BufferedImage; -import java.text.AttributedCharacterIterator; -import java.text.AttributedString; -import java.util.HashMap; -import java.util.Map; - -/** - * Utility class for creating image files. - * - * @author Kelvin Low - * @since 1.0 - */ -public class ImageUtil { - - // The BufferedImage cache. - private static HashMap imageCache = new HashMap(); - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private ImageUtil() { - } - - /** - * Creates a BufferedImage from the given image file. - * - * @param imageFile - * an image file - * @param c - * an AWT component - */ - public static BufferedImage getBufferedImage(String imageFile, Component c) { - if (imageFile == null || c == null) { - return null; - } - - BufferedImage bufferedImage = (BufferedImage) imageCache.get(imageFile); - if (bufferedImage != null) { - return bufferedImage; - } - - Image image = c.getToolkit().getImage(imageFile); - MediaTracker tracker = new MediaTracker(c); - tracker.addImage(image, 0); - try { - tracker.waitForAll(); - } catch (InterruptedException e) { - } - - bufferedImage = new BufferedImage(image.getWidth(c), - image.getHeight(c), BufferedImage.TYPE_INT_ARGB); - - Graphics2D g2d = bufferedImage.createGraphics(); - g2d.drawImage(image, 0, 0, c); - imageCache.put(imageFile, bufferedImage); - - return bufferedImage; - } - - /** - * Returns true if the given image is loaded successfully. - * - * @param image - * an AWT image - * @param c - * an AWT component - */ - public static boolean waitForImage(Image image, Component c) { - MediaTracker tracker = new MediaTracker(c); - tracker.addImage(image, 0); - try { - tracker.waitForAll(); - } catch (InterruptedException ie) { - } - return (!tracker.isErrorAny()); - } - - /** - * Draws the given text. - * - * @param g2d - * the Graphics2D context - * @param text - * the text to be rendered - * @param font - * the font used for rendering the text - * @param color - * the color used for rendering the text - * @param x - * the horizontal coordinate used for rendering the text - * @param y - * the verticalcoordinate used for rendering the text - */ - public static void drawText(Graphics2D g2d, String text, Font font, - Color color, int x, int y) { - if (text == null || text.length() == 0) { - return; - } - g2d.setColor(color); - FontRenderContext frc = g2d.getFontRenderContext(); - TextLayout textlayout = new TextLayout(text, font, frc); - textlayout.draw(g2d, x, y); - } - - /** - * Draws the given text and wraps it based on the given width. - * - * @param g2d - * the Graphics2D context - * @param text - * the text to be rendered - * @param font - * the font used for rendering the text - * @param color - * the color used for rendering the text - * @param x - * the horizontal coordinate used for rendering the text - * @param y - * the verticalcoordinate used for rendering the text - * @param width - * the maximum width used for wrapping the text - * @param maxLine - * the maximum number of line of wrapped text - */ - public static void drawText(Graphics2D g2d, String text, Font font, - Color color, int x, int y, float width, int maxLine) { - if (text == null || text.length() == 0) { - return; - } - float maxWrapWidth = width - 10; - g2d.setColor(color); - Point2D.Float pen = new Point2D.Float(x, y); - Map attributes = new HashMap(); - attributes.put(TextAttribute.FONT, font); - AttributedCharacterIterator textIterator = new AttributedString(text, - attributes).getIterator(); - FontRenderContext frc = g2d.getFontRenderContext(); - LineBreakMeasurer measurer = new LineBreakMeasurer(textIterator, frc); - int line = 1; - while (line <= maxLine) { - TextLayout layout = measurer.nextLayout(maxWrapWidth); - if (layout == null) - break; - pen.y += layout.getAscent(); - float dx = 0; - if (layout.isLeftToRight()) { - dx = (width - layout.getAdvance()); - } - layout.draw(g2d, pen.x + dx / 2, pen.y); - pen.y += layout.getDescent() + layout.getLeading() - 1; - line++; - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MathUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MathUtil.java deleted file mode 100644 index 0ad88f943e2..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/MathUtil.java +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -/** - * Utility class for performing math operations. - * - * @author Phong Nguyen Le - * @since 1.0 - */ -public class MathUtil { - - public static final long ceil1000(long l) { - return (l - (l & 7)); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/NetUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/NetUtil.java deleted file mode 100644 index b12f20edf37..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/NetUtil.java +++ /dev/null @@ -1,400 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLDecoder; - -/** - * Implements a utility class for managing URLs and URIs. - * - * @author Kelvin Low - * @since 1.0 - */ -public class NetUtil { - - /** - * FILE scheme. - */ - public final static String FILE_SCHEME = "file"; //$NON-NLS-1$ - - /** - * File URI prefix. - */ - public final static String FILE_URI_PREFIX = FILE_SCHEME + ":/"; //$NON-NLS-1$ - - /** - * File URI prefix size. - */ - public final static int FILE_URI_PREFIX_LENGTH = FILE_URI_PREFIX.length(); - - /** - * HTTP scheme. - */ - public final static String HTTP_SCHEME = "http"; //$NON-NLS-1$ - - /** - * HTTP URI prefix. - */ - public final static String HTTP_URI_PREFIX = HTTP_SCHEME + "://"; //$NON-NLS-1$ - - /** - * HTTP URI prefix size. - */ - public final static int HTTP_URI_PREFIX_LENGTH = HTTP_URI_PREFIX.length(); - - public static final String FILE_PREFIX_2 = "file://"; //$NON-NLS-1$ - - public static final String FILE_PREFIX_3 = "file:///"; //$NON-NLS-1$ - - /** - * A table of hex values. - */ - private final static String[] HEX_VALUES = { - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%28", "%29", "%2A", "%2B", "%2C", "%2D", "%2E", "%2F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%30", "%31", "%32", "%33", "%34", "%35", "%36", "%37", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%38", "%39", "%3A", "%3B", "%3C", "%3D", "%3E", "%3F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%40", "%41", "%42", "%43", "%44", "%45", "%46", "%47", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%48", "%49", "%4A", "%4B", "%4C", "%4D", "%4E", "%4F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%50", "%51", "%52", "%53", "%54", "%55", "%56", "%57", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%58", "%59", "%5A", "%5B", "%5C", "%5D", "%5E", "%5F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%60", "%61", "%62", "%63", "%64", "%65", "%66", "%67", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%68", "%69", "%6A", "%6B", "%6C", "%6D", "%6E", "%6F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%70", "%71", "%72", "%73", "%74", "%75", "%76", "%77", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%78", "%79", "%7A", "%7B", "%7C", "%7D", "%7E", "%7F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - }; - - public static final String RAW_URL_RAW = "raw_URL_raw"; //$NON-NLS-1$ - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private NetUtil() { - } - - /** - * Returns the URI for the given file. - * - * @param file - * The input file. - * @return The URI for the given file. - * @throws MalformedURLException - * if an error occur while constructing the URI for the given - * file. - */ - public static String getUri(File file) throws MalformedURLException { - String url = file.toURL().toExternalForm(); - StringBuffer strBuf = new StringBuffer(); - int urlLength = url.length(); - for (int i = 0; i < urlLength; i++) { - char ch = url.charAt(i); - switch (ch) { - case ' ': - strBuf.append("%20"); //$NON-NLS-1$ - break; - default: - strBuf.append(ch); - break; - } - } - return strBuf.toString(); - } - - /** - * Resolves the given URI using the given the base URI. - * - * @param uri - * The URI to resolve. - * @param baseUri - * The base URI. - * @return A fully formed URI. - */ - public static String resolveUri(String uri, String baseUri) { - if (uri == null) { - return null; - } - - if (uri.startsWith("../")) { //$NON-NLS-1$ - if (baseUri.endsWith("/")) { //$NON-NLS-1$ - baseUri = baseUri.substring(0, baseUri.length() - 1); - } - while (uri.startsWith("../")) { //$NON-NLS-1$ - uri = uri.substring(3); - int index = baseUri.lastIndexOf('/'); - if (index > 0) { - baseUri = baseUri.substring(0, index); - } - } - uri = "/" + uri; //$NON-NLS-1$ - } - - if (uri.startsWith("/")) { //$NON-NLS-1$ - return baseUri.endsWith("/") //$NON-NLS-1$ - ? baseUri + uri.substring(1) : baseUri + uri; - } - - if (uri.startsWith(FILE_URI_PREFIX) || uri.startsWith(HTTP_URI_PREFIX)) { - return uri; - } - - return baseUri.endsWith("/") ? baseUri + uri : baseUri + '/' + uri; //$NON-NLS-1$ - } - - /** - * Returns the input stream for the given URI. - * - * @param uri - * The source URI. - * @return The input stream for the given URI. - * @throw MalformedURLException if a given XML document URI is invalid. - * @throw IOException if an I/O error occur while accessing the URI. - */ - public static InputStream getInputStream(String uri) - throws MalformedURLException, IOException { - if (uri == null) { - return null; - } - - if (uri.startsWith(HTTP_URI_PREFIX)) { - URL url = new URL(uri); - return url.openStream(); - } else if (uri.startsWith(FILE_URI_PREFIX)) { - uri = uri.substring(FILE_URI_PREFIX_LENGTH); - } - - return new FileInputStream(NetUtil.decodeUrl(uri, null)); - } - - /** - * Returns the Java string represention (encoded in UTF-16) of the given URL - * (encoded in the given encoding and ASCII-escaped). - * - * @param url - * The URL to decode. - * @param encoding - * The encoding of the URL. - * @return The Java UTF-16 string respresentation. - * @throws IllegalArgumentException - * if the given URL contain improperly escaped characters. - */ - public static String decodeUrl(String url, String encoding) { - if (url == null) { - return url; - } - - int len = url.length(); - if (len == 0) { - return url; - } - - // Unescape the url. - StringBuffer strBuf = new StringBuffer(); - for (int i = 0; i < len; i++) { - char ch = url.charAt(i); - switch (ch) { - case '+': - strBuf.append(' '); - break; - case '%': - try { - strBuf.append((char) Integer.parseInt(url.substring(i + 1, - i + 3), 16)); - } catch (NumberFormatException e) { - throw new IllegalArgumentException(); - } - i += 2; - break; - default: - strBuf.append(ch); - break; - } - } - - // Convert the un-escaped byte values to Java UTF-16 string. - String result = strBuf.toString(); - if (encoding != null) { - try { - byte[] bytes = result.getBytes("8859_1"); //$NON-NLS-1$ - result = new String(bytes, encoding); - } catch (UnsupportedEncodingException e) { - } - } - - return result; - } - - /** - * Returns the ASCII-escaped representation (encoded in the specified - * encoding) of the given URL (encoded in UTF-16). - * - * @param url - * The URL to encode. - * @param encoding - * The encoding of the URL. - * @return the ASCII-escaped respresentation. - * @throws IllegalArgumentException - * if the given URL contain improperly escaped characters. - * @throws UnsupportedEncodingException - * if the given coding is unsupport. - */ - public static String encodeUrl(String url, String encoding) - throws UnsupportedEncodingException { - if (url == null) { - return url; - } - int len = url.length(); - if (len == 0) { - return url; - } - - StringBuffer result = new StringBuffer(); - - byte[] bytes = url.getBytes(encoding); - for (int i = 0; i < bytes.length; i++) { - char ch = (char) bytes[i]; - - if (ch >= 'a' && ch <= 'z') { - result.append(ch); - } else if (ch >= 'A' && ch <= 'Z') { - result.append(ch); - } else if (ch >= '0' && ch <= '9') { - result.append(ch); - } else { - switch (ch) { - case '-': - case '_': - case '.': - case '!': - case '~': - case '*': - case '\'': - case '(': - case ')': - result.append(ch); - break; - default: - result.append(HEX_VALUES[ch & 0xFF]); - break; - } - } - } - - return result.toString(); - } - - /** - * Returns the ASCII-escaped representation of the given file URL. - * - * @param fileURL - * The file URL to encode. - * @return the ASCII-escaped respresentation. - */ - public static String encodeFileURL(String fileURL) { - String url = fileURL; - StringBuffer strBuf = new StringBuffer(); - int urlLength = url.length(); - for (int i = 0; i < urlLength; i++) { - char ch = url.charAt(i); - switch (ch) { - case ' ': - strBuf.append("+"); //$NON-NLS-1$ - break; - default: - strBuf.append(ch); - break; - } - } - return strBuf.toString(); - } - - /** - * Returns the ASCII-escaped representation of the given file URL. - * - * @param fileURL - * The file URL to encode. - * @return the ASCII-escaped respresentation. - */ - public static String decodedFileUrl(String fileURL) { - if (isRawUrl(fileURL)) { - return fileURL; - } - - String url = fileURL; - StringBuffer strBuf = new StringBuffer(); - int urlLength = url.length(); - for (int i = 0; i < urlLength; i++) { - char ch = url.charAt(i); - switch (ch) { - case '+': - strBuf.append(' '); - break; - case '%': - try { - strBuf.append((char) Integer.parseInt(url.substring(i + 1, - i + 3), 16)); - } catch (NumberFormatException e) { - throw new IllegalArgumentException(); - } - i += 2; - break; - default: - strBuf.append(ch); - break; - } - } - return strBuf.toString(); - } - - public static String decodeURL (String url) throws UnsupportedEncodingException { -// url = url.replaceAll("\\+", "%2B"); //$NON-NLS-1$ - url = URLDecoder.decode(url, "UTF-8"); //$NON-NLS-1$ - return url; - } - - public static boolean isRawUrl(String url) { - boolean result = false; - - if (url.endsWith(RAW_URL_RAW)) { - result = true; - } - - return result; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java deleted file mode 100644 index db94b48b4b1..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.PrintStream; - - -/** - * Utility class for profiling - * - * @author Weiping Lu - * @since 1.0 - */ - -public class ProfilingUtil { - - public static boolean traceFootprint = false; - - private static PrintStream output = System.out; - - public static void setOutput(PrintStream ps) { - output = ps; - } - - public static void fullGC() { - Runtime rt = Runtime.getRuntime(); - long isFree = rt.freeMemory(); - long wasFree; - do { - wasFree = isFree; - rt.runFinalization(); - rt.gc(); - isFree = rt.freeMemory(); - } while (isFree > wasFree); - } - - public static long traceUsedMemory(String location) { - Runtime rt = Runtime.getRuntime(); - long usedMem = rt.totalMemory() - rt.freeMemory(); - output.println("Footprint> " + location + ": " + usedMem/1000 + " K"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - return usedMem; - } - - public static long traceUsedMemoryDiff(String locationInfo, long currUsed, long PrevUsed) { - long diff = currUsed - PrevUsed; - output.println("Footprint> Diff, " + locationInfo + ": " + diff/1000 + " K\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - - return diff; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/RestartableJob.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/RestartableJob.java deleted file mode 100644 index c60e94cc1c6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/RestartableJob.java +++ /dev/null @@ -1,123 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2008 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; - -/** - * Job class that is re-startable - * - * @author Weiping Lu - * @since 1.5 - */ - -public abstract class RestartableJob extends Job { - - protected static boolean localDebug = false; - - private boolean toRestart = true; - private boolean schedulingLocked = false; - private boolean enabled = true; - - public RestartableJob(String name) { - super(name); - } - - public final void guardedSchedule(long delay) { - guardedSchedule(delay, false); - } - - private void guardedSchedule(long delay, boolean inRunCall) { - if ( ! isEnabled()) { - return; - } - if (!inRunCall && getState() != Job.NONE) { - return; - } - if (isSchedulingLocked()) { - return; - } - if (localDebug) { - System.out.println("LD> guardedSchedule completed"); //$NON-NLS-1$ - } - setSchedulingLocked(true); - schedule(delay); - } - - protected final IStatus run(IProgressMonitor monitor) { - if (localDebug) { - System.out.println("LD> RestartableJob.run"); //$NON-NLS-1$ - } - setSchedulingLocked(false); - setToRestart(false); - IStatus status = Status.OK_STATUS; - try { - status = restartableRun(monitor); - } catch (RestartInterruptException e) { - guardedSchedule(e.getDelay(), true); - } - - return Status.OK_STATUS; - } - - protected abstract IStatus restartableRun(IProgressMonitor monitor) throws RestartInterruptException; - protected abstract void resetToRestart(); - - private synchronized boolean isSchedulingLocked() { - return schedulingLocked; - } - - private synchronized void setSchedulingLocked(boolean schedulingLocked) { - this.schedulingLocked = schedulingLocked; - } - - private synchronized boolean isToRestart() { - return toRestart; - } - - private synchronized void setToRestart(boolean toRestart) { - this.toRestart = toRestart; - } - - public void enableToRestart() { - setToRestart(true); - } - - public void checkRestartInterruptException(long delay) throws RestartInterruptException { - if (isToRestart()) { - resetToRestart(); - throw new RestartInterruptException(delay); - } - } - - public static class RestartInterruptException extends Exception { - private long delay = 0; - public RestartInterruptException(long delay) { - this.delay = delay; - } - - public long getDelay() { - return delay; - } - } - - public synchronized boolean isEnabled() { - return enabled; - } - - public synchronized void setEnabled(boolean enabled) { - this.enabled = enabled; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StrUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StrUtil.java deleted file mode 100644 index b4fd0c17f65..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StrUtil.java +++ /dev/null @@ -1,676 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.net.URI; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.epf.common.CommonPlugin; - -import com.ibm.icu.lang.UCharacter; -import com.ibm.icu.util.StringTokenizer; - -/** - * A helper class for manuipulating strings. - * - * @author Kelvin Low - * @author Jinhua Xi - * @since 1.0 - */ -public class StrUtil { - public static final String EMPTY_STRING = ""; //$NON-NLS-1$ - - public static final String TAB = "\t"; //$NON-NLS-1$ - - private static final String REGEXP_ANY_SPECIAL_CHARS = "(`|~|!|@|#|\\$|%|\\^|&|\\*|\\(|\\)|\\+|=|\\[|\\]|\\||\\:|\"|<|>|\\?|/|'|\\s|\\\\)+"; //$NON-NLS-1$ - - private static final String REGEXP_INVALID_PUBLISHED_PATH_CHARS = "(\\[|#|\\*|\\?|\"|<|>|\\||!|%|/|\\])+"; //$NON-NLS-1$ - - private static final String REGEXP_INVALID_PUBLISHED_PATH_CHARS_LINUX = "(\\[|#|\\*|\\?|\"|<|>|\\||!|%|\\])+"; //$NON-NLS-1$ - - private static final String REGEXP_INVALID_FILENAME_CHARS = "(\\[|#|/|\\\\|\\:|\\*|\\?|\"|<|>|\\||\\]|\\s)+"; //$NON-NLS-1$ - - private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', - '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - - public static final String LINE_FEED = System.getProperty("line.separator"); //$NON-NLS-1$ - - public static final String ESCAPED_LF = " "; //$NON-NLS-1$ - - public static final String ESCAPED_CR = " "; //$NON-NLS-1$ - - public static final String ESCAPED_LINE_FEED = LINE_FEED.replace( - "\n", ESCAPED_LF).replace("\r", ESCAPED_CR); //$NON-NLS-1$ //$NON-NLS-2$ - - public static final String LINE_FEED_REGEX = LINE_FEED.replaceAll( - "\\\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$ - - public static final String ESCAPED_LINE_FEED_REGEX = ESCAPED_LINE_FEED; - - public static final String HTML_BREAK = "
";//$NON-NLS-1$ - - public static final String HTML_COPY = "©";//$NON-NLS-1$ - - public static final String HTML_EURO = "€";//$NON-NLS-1$ - - public static final String HTML_REG = "®";//$NON-NLS-1$ - - public static final String HTML_TRADEMARK = "™";//$NON-NLS-1$ - - public static boolean during_migration = false; - - private static StrUtilOptions options; - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private StrUtil() { - } - - /** - * Tests for null string. - *

- * A null string is defined as one that has an empty reference or has zero - * length. - * - * @param str - * a string - * @return true if the given string is a null string - */ - public static boolean isNull(String str) { - return str == null || str.length() == 0; - } - - /** - * Tests for blank string. - *

- * A blank string is defined as one that has an empty reference or has zero - * length after the leading and trailing space characters are trimmed. - * - * @param str - * a string - * @return true if the given string is a blank string - */ - public static boolean isBlank(String str) { - return str == null || str.trim().length() == 0; - } - - /** - * Removes the leading and trailing space characters from a string. - * - * @param str - * a string - * @return a string with no leading and trailing space characters - */ - public static String trim(String str) { - return str == null ? null : str.trim(); - } - - /** - * Removes whitespace characters (TAB, CR, LF and SPACE) from a string. - * - * @param str - * a string - * @return a string with whitespace characters removed - */ - public static String removeWhiteSpaceChars(String str) { - int len = (str == null) ? 0 : str.length(); - for (int i = 0; i < len; i++) { - switch (str.charAt(i)) { - case '\t': - case '\r': - case '\n': - case ' ': - break; - default: - return str; - } - } - return ""; //$NON-NLS-1$ - } - - /** - * Removes CR, LF from a string. - * - * @param str - * a string - * @return a string with CR, LF removed - */ - public static String removeNewlines(String str) { - StringBuffer sb = new StringBuffer(); - int len = (str == null) ? 0 : str.length(); - for (int i = 0; i < len; i++) { - char c = str.charAt(i); - switch (c) { - case '\r': - case '\n': - break; - default: - sb.append(c); - } - } - return sb.toString(); - } - - /** - * Splits a string into an array of string tokens. - * - * @param str - * a string - * @param sep - * a string containing the string separators - * @param count - * the desired number of string tokens - * @return an array of string tokens - */ - public static String[] split(String str, String sep, int count) { - if (str == null || count == 0 || count < -1) { - return null; - } - - StringTokenizer tokenizer = new StringTokenizer(str, sep, - count == -1 ? false : true); - - if (count == -1) { - count = tokenizer.countTokens(); - } - - String[] result = new String[count]; - int i = 0; - while (tokenizer.hasMoreTokens()) { - String t = tokenizer.nextToken(); - if (i < count) { - if ((t.length() == 1) && (sep.indexOf(t) != -1)) { - continue; - } - result[i++] = t; - } else { - result[count - 1] += t; - } - } - return result; - } - - /** - * Splits a string into an array of string tokens. - * - * @param str - * a string - * @param sep - * a string containing the string separators - * @return an array of string tokens - */ - public static String[] split(String str, String sep) { - return split(str, sep, -1); - } - - /** - * Replaces a substring within a string with another substring. - *

- * Note: Only the first occurrence of the substring will be replaced. - * - * @param str - * a string - * @param src - * the substring to replace - * @param tgt - * the substring to use for the replacement - * @return a string with the first substring replaced - * - * TODO: Review implementation. Call String.replaceFirst() instead? - */ - public static String replace(String str, String src, String tgt) { - if ((str == null || str.length() == 0) - || (src == null || src.length() == 0)) { - return str; - } - - String tmpStr = str; - int index; - while ((index = tmpStr.indexOf(src)) != -1) { - tmpStr = tmpStr.substring(0, index) + tgt - + tmpStr.substring(index + src.length()); - } - return tmpStr; - } - - /** - * Returns the integer value of a string. - * - * @param str - * a string - * @param defaultValue - * a default integer value for the string - * @return the integer value of the given string - */ - public static int getIntValue(String str, int defaultValue) { - if (StrUtil.isBlank(str)) { - return defaultValue; - } - - try { - return Integer.parseInt(str); - } catch (NumberFormatException e) { - return defaultValue; - } - } - - /** - * Returns an array of bytes representing the UTF-8 encoding of a string. - * - * @param str - * a string - * @return a byte array containing the UTF-8 encoding of the given string - */ - public static byte[] getUTF8Bytes(String str) { - char[] c = str.toCharArray(); - int len = c.length; - int count = 0; - for (int i = 0; i < len; i++) { - int ch = c[i]; - if (ch <= 0x7f) { - count++; - } else if (ch <= 0x7ff) { - count += 2; - } else { - count += 3; - } - } - - byte[] b = new byte[count]; - int off = 0; - for (int i = 0; i < len; i++) { - int ch = c[i]; - if (ch <= 0x7f) { - b[off++] = (byte) ch; - } else if (ch <= 0x7ff) { - b[off++] = (byte) ((ch >> 6) | 0xc0); - b[off++] = (byte) ((ch & 0x3f) | 0x80); - } else { - b[off++] = (byte) ((ch >> 12) | 0xe0); - b[off++] = (byte) (((ch >> 6) & 0x3f) | 0x80); - b[off++] = (byte) ((ch & 0x3f) | 0x80); - } - } - return b; - } - - /** - * Returns the hexidecimal character representation for an integer. - * - * @param value - * an integer - * @return the hexidecimal representation - */ - private static char toHex(int value) { - return HEX_DIGITS[(value & 0xF)]; - } - - /** - * Returns the escaped Unicode representation of a string. - * - * @param str - * a string - * @param skipASCII - * if true, avoid escaping the ASCII characters - * @return the escaped Unicode representation of the given string - */ - public static String toEscapedUnicode(String str, boolean skipASCII) { - int len = str.length(); - StringBuffer result = new StringBuffer(len * 2); - - for (int i = 0; i < len; i++) { - char ch = str.charAt(i); - - if (skipASCII && ch < 0x007E) { - result.append(ch); - } else { - result.append("\\u"); //$NON-NLS-1$ - result.append(toHex((ch >> 12) & 0xF)); - result.append(toHex((ch >> 8) & 0xF)); - result.append(toHex((ch >> 4) & 0xF)); - result.append(toHex(ch & 0xF)); - } - } - - return result.toString(); - } - - /** - * Returns the escaped HTML representation of a string. - * - * @param html - * a HTML string - * @return the escaped Unicode representation of the given HTML string - */ - public static String getEscapedHTML(String html) { - if (html == null || html.length() == 0) { - return ""; //$NON-NLS-1$ - } - - StrUtilOptions options = getOptions(); - StringBuffer result = new StringBuffer(); - int length = html.length(); - for (int i = 0; i < length; i++) { - char ch = html.charAt(i); - switch (ch) { - case '%': - if (i + 4 < length) { - String hexStr = html.substring(i + 1, i + 5); - boolean validHextStr = true; - - for (int j = 0; j < hexStr.length(); j++) { - char c = hexStr.charAt(j); - if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) { - validHextStr = false; - break; - } - } - - if (options == null) { - //code below will treat "%20de" as " de" - //this may lose some double bytes character(e.g. Chinese), which start with %20, but keep all url links - //so far open this convertion not only during library migration to support file like "my design.gif" - if (/*during_migration && */validHextStr) { - if (hexStr.startsWith("20")) { //$NON-NLS-1$ - result.append("%20"); //$NON-NLS-1$ - i += 2; - break; - } - } - } else { - int ix = options.getRteUrlDecodingOption(); - if (ix == 1) { - validHextStr = false; - } else if (ix == 2) { - String key = getHexStr("%" + hexStr); - if (key != null && options.getRteUrlDecodingHexMap().containsKey(key)) { - validHextStr = false; - } - } - } - - if (validHextStr) { - try { - int codePoint = Integer.parseInt(hexStr, 16); - char[] c = UCharacter.toChars(codePoint); - result.append(c); - i += 4; - break; - } catch (NumberFormatException e) { - // wasn't a valid hex string.. - // fall through to the result.append(ch) - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - } - } - result.append(ch); - break; - case '\u00a9': - result.append(HTML_COPY); - break; - case '\u00ae': - result.append(HTML_REG); - break; - case '\u20ac': - result.append(HTML_EURO); - break; - case '\u2122': - result.append(HTML_TRADEMARK); - break; - default: - result.append(ch); - break; - } - } - return result.toString(); - } - - /** - * Returns the plain text from HTML text. - *

- * Note: All HTML tags will be stripped. - * - * @param html - * the HTML text. - * @return the plain text representation of the given HTML text - */ - public static String getPlainText(String html) { - if (html == null) { - return ""; //$NON-NLS-1$ - } - - final Pattern p_plaintext_filter = Pattern.compile( - "<[^>]*?>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$ - final Pattern p_plaintext_filter2 = Pattern.compile( - "&.{1,5}[^;];", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$ - final Pattern p_plaintext_filter3 = Pattern.compile( - "\\s+", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$ - - String result = html.replaceAll(p_plaintext_filter.pattern(), " ") //$NON-NLS-1$ - .replaceAll(p_plaintext_filter2.pattern(), " ") //$NON-NLS-1$ - .replaceAll(p_plaintext_filter3.pattern(), " "); //$NON-NLS-1$ - return result; - } - - /** - * Converts a string into a valid file name. - * - * @param str - * a string - * @return a valid file name derived from the given string - */ - public static String makeValidFileName(String str) { - if (str == null) { - return ""; //$NON-NLS-1$ - } - return getPlainText(str) - .replaceAll(REGEXP_INVALID_FILENAME_CHARS, " ").trim(); //$NON-NLS-1$ - } - - public static String removeSpecialCharacters(String str) { - if (str == null) { - return ""; //$NON-NLS-1$ - } - return getPlainText(str) - .replaceAll(REGEXP_ANY_SPECIAL_CHARS, " ").trim(); //$NON-NLS-1$ - } - - /** - * Returns true if the path does not contain any invalid filename - * characters. - * - * @param path - * the file path - * @return true if the given path contains only valid - * filename characters - */ - public static boolean isValidPublishPath(String path) { - // return path.replaceAll(invalidPublishPathCharsRegExp, - // "").equals(path); - - if (Platform.getOS().equals(Platform.WS_WIN32)) { - return path - .replaceAll(REGEXP_INVALID_PUBLISHED_PATH_CHARS, "").equals(path); //$NON-NLS-1$ - } - - // else default to Linux - return path - .replaceAll(REGEXP_INVALID_PUBLISHED_PATH_CHARS_LINUX, "").equals(path); //$NON-NLS-1$ - } - - /** - * Returns the lower-case of str unless the current locale is German - * - * @param str - * @return - */ - public static String toLower(String str) { - if (Platform.getNL().startsWith("de")) { //$NON-NLS-1$ - return str; - } - return str.toLowerCase(); - } - - /** - * escape the " and ' - * - * @param str - * @return - */ - public static String escape(String str) { - return str.replaceAll("'", "\\\\\'").replaceAll("\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } - - /** - * Converts a List to an String array. - * - * @param list - * a List - * @return a String array - */ - public static String[] convertListToStrArray(List list) { - if (list != null) { - int cnt = list.size(); - String[] strArray = new String[cnt]; - - for (int i = 0; i < cnt; i++) { - String str = (String) list.get(i); - strArray[i] = new String(str); - } - return strArray; - } else { - return null; - } - } - - public static boolean isValidName(String name) { - return name.replaceAll(REGEXP_ANY_SPECIAL_CHARS, "").equals(name); //$NON-NLS-1$ - } - - /** - * added some test code - * - * @param args - */ - public static void main(String[] args) { - - String text = "A&% `&# $~!@#$%^&*()_-+={}[\"]:|\\:;\"'<,>.?/ \t\r\nZ"; //$NON-NLS-1$ - - System.out.println("[" + text + "] <== text"); //$NON-NLS-1$ //$NON-NLS-2$ - System.out.println("[" + text.replaceAll(REGEXP_ANY_SPECIAL_CHARS, " ") //$NON-NLS-1$ //$NON-NLS-2$ - + "] <== All"); //$NON-NLS-1$ - System.out.println("[" //$NON-NLS-1$ - + text.replaceAll(REGEXP_INVALID_FILENAME_CHARS, " ") //$NON-NLS-1$ - + "] <== File Name"); //$NON-NLS-1$ - System.out.println("[" //$NON-NLS-1$ - + text.replaceAll(REGEXP_INVALID_PUBLISHED_PATH_CHARS, " ") //$NON-NLS-1$ - + "] <== path"); //$NON-NLS-1$ - System.out.println("[" //$NON-NLS-1$ - + text.replaceAll(REGEXP_INVALID_PUBLISHED_PATH_CHARS_LINUX, - " ") + "] <== path, Linux"); //$NON-NLS-1$ //$NON-NLS-2$ - - System.out.println(""); //$NON-NLS-1$ - } - - /** - * Converts the platform line-separator (\n or \n\r or \r) to <br/> - * - * @param text - * @return - */ - public static String convertNewlinesToHTML(String text) { - if (text != null) { - text = text.replaceAll(LINE_FEED_REGEX, HTML_BREAK + LINE_FEED); - text = text.replaceAll(ESCAPED_LINE_FEED_REGEX, HTML_BREAK - + ESCAPED_LINE_FEED); - } - return text; - } - - public static URI toURI(String pathStr) { - if (pathStr != null && pathStr.length() > 0) { - IPath path = Path.fromOSString(pathStr); - try { - return path.toFile().toURI(); - } catch (Exception e) { - CommonPlugin.getDefault().getLogger().logError(e); - } - } - return null; - } - - public static String escapeChar(String text, char c) { - int i=text.indexOf(c); - if ( i < 0 ) { - return text; - } - - int start = 0; - StringBuffer buffer = new StringBuffer(); - while ( i > start ) { - buffer.append(text.substring(start, i)).append("\\"); //$NON-NLS-1$ - start = i; - i=text.indexOf(c, start+1); - } - - buffer.append(text.substring(start)); - - return buffer.toString(); - } - - public static String getHexStr(String str) { - if (str.length() < 3) { - return null; - } - if (str.charAt(0) != '%') { - return null; - } - StringBuffer b = new StringBuffer(); - b.append('%'); - for (int i = 1 ; i <= 2; i++) { - char c = str.charAt(i); - if (c >= 'a' && c <= 'z') { - c -= 'a'; - c += 'A'; - } - boolean valid = (c >= '0' && c <= '9') || - (c >= 'A' && c <= 'F'); - if (!valid) { - return null; - } - b.append(c); - } - - return b.toString(); - } - - public interface StrUtilOptions { - int getRteUrlDecodingOption(); - Map getRteUrlDecodingHexMap(); - } - - public static StrUtilOptions getOptions() { - return options; - } - - public static void setOptions(StrUtilOptions options) { - StrUtil.options = options; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StringMatcher.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StringMatcher.java deleted file mode 100644 index 4a0b4b443aa..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/StringMatcher.java +++ /dev/null @@ -1,458 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.epf.common.utils; - -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; -import java.util.Vector; - -/** - * A string pattern matcher. Supports '*' and '?' wildcards. - */ -public class StringMatcher { - protected String fPattern; - protected int fLength; // pattern length - protected boolean fIgnoreWildCards; - protected boolean fIgnoreCase; - protected boolean fHasLeadingStar; - protected boolean fHasTrailingStar; - protected String fSegments[]; //the given pattern is split into * separated segments - - /* boundary value beyond which we don't need to search in the text */ - protected int fBound= 0; - - - protected static final char fSingleWildCard= '\u0000'; - - public static class Position { - int start; //inclusive - int end; //exclusive - public Position(int start, int end) { - this.start= start; - this.end= end; - } - public int getStart() { - return start; - } - public int getEnd() { - return end; - } - } - /** - * StringMatcher constructor takes in a String object that is a simple - * pattern. The pattern may contain '*' for 0 and many characters and - * '?' for exactly one character. - * - * Literal '*' and '?' characters must be escaped in the pattern - * e.g., "\*" means literal "*", etc. - * - * Escaping any other character (including the escape character itself), - * just results in that character in the pattern. - * e.g., "\a" means "a" and "\\" means "\" - * - * If invoking the StringMatcher with string literals in Java, don't forget - * escape characters are represented by "\\". - * - * @param pattern the pattern to match text against - * @param ignoreCase if true, case is ignored - * @param ignoreWildCards if true, wild cards and their escape sequences are ignored - * (everything is taken literally). - */ - public StringMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards) { - if (pattern == null) - throw new IllegalArgumentException(); - fIgnoreCase= ignoreCase; - fIgnoreWildCards= ignoreWildCards; - fPattern= pattern; - fLength= pattern.length(); - - if (fIgnoreWildCards) { - parseNoWildCards(); - } else { - parseWildCards(); - } - } - /** - * Find the first occurrence of the pattern between startend(exclusive). - * @param text the String object to search in - * @param start the starting index of the search range, inclusive - * @param end the ending index of the search range, exclusive - * @return an StringMatcher.Position object that keeps the starting - * (inclusive) and ending positions (exclusive) of the first occurrence of the - * pattern in the specified range of the text; return null if not found or subtext - * is empty (start==end). A pair of zeros is returned if pattern is empty string - * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc" - * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned - */ - public StringMatcher.Position find(String text, int start, int end) { - if (text == null) - throw new IllegalArgumentException(); - - int tlen= text.length(); - if (start < 0) - start= 0; - if (end > tlen) - end= tlen; - if (end < 0 ||start >= end ) - return null; - if (fLength == 0) - return new Position(start, start); - if (fIgnoreWildCards) { - int x= posIn(text, start, end); - if (x < 0) - return null; - return new Position(x, x+fLength); - } - - int segCount= fSegments.length; - if (segCount == 0)//pattern contains only '*'(s) - return new Position (start, end); - - int curPos= start; - int matchStart= -1; - int i; - for (i= 0; i < segCount && curPos < end; ++i) { - String current= fSegments[i]; - int nextMatch= regExpPosIn(text, curPos, end, current); - if (nextMatch < 0 ) - return null; - if(i == 0) - matchStart= nextMatch; - curPos= nextMatch + current.length(); - } - if (i < segCount) - return null; - return new Position(matchStart, curPos); - } - /** - * match the given text with the pattern - * @return true if matched eitherwise false - * @param text a String object - */ - public boolean match(String text) { - return match(text, 0, text.length()); - } - /** - * Given the starting (inclusive) and the ending (exclusive) positions in the - * text, determine if the given substring matches with aPattern - * @return true if the specified portion of the text matches the pattern - * @param text a String object that contains the substring to match - * @param start marks the starting position (inclusive) of the substring - * @param end marks the ending index (exclusive) of the substring - */ - public boolean match(String text, int start, int end) { - if (null == text) - throw new IllegalArgumentException(); - - if (start > end) - return false; - - if (fIgnoreWildCards) - return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength); - int segCount= fSegments.length; - if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) // pattern contains only '*'(s) - return true; - if (start == end) - return fLength == 0; - if (fLength == 0) - return start == end; - - int tlen= text.length(); - if (start < 0) - start= 0; - if (end > tlen) - end= tlen; - - int tCurPos= start; - int bound= end - fBound; - if ( bound < 0) - return false; - int i=0; - String current= fSegments[i]; - int segLength= current.length(); - - /* process first segment */ - if (!fHasLeadingStar){ - if(!regExpRegionMatches(text, start, current, 0, segLength)) { - return false; - } else { - ++i; - tCurPos= tCurPos + segLength; - } - } - if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) { - // only one segment to match, no wildcards specified - return tCurPos == end; - } - /* process middle segments */ - while (i < segCount) { - current= fSegments[i]; - int currentMatch; - int k= current.indexOf(fSingleWildCard); - if (k < 0) { - currentMatch= textPosIn(text, tCurPos, end, current); - if (currentMatch < 0) - return false; - } else { - currentMatch= regExpPosIn(text, tCurPos, end, current); - if (currentMatch < 0) - return false; - } - tCurPos= currentMatch + current.length(); - i++; - } - - /* process final segment */ - if (!fHasTrailingStar && tCurPos != end) { - int clen= current.length(); - return regExpRegionMatches(text, end - clen, current, 0, clen); - } - return i == segCount ; - } - - /** - * This method parses the given pattern into segments seperated by wildcard '*' characters. - * Since wildcards are not being used in this case, the pattern consists of a single segment. - */ - private void parseNoWildCards() { - fSegments= new String[1]; - fSegments[0]= fPattern; - fBound= fLength; - } - /** - * Parses the given pattern into segments seperated by wildcard '*' characters. - */ - private void parseWildCards() { - if(fPattern.startsWith("*"))//$NON-NLS-1$ - fHasLeadingStar= true; - if(fPattern.endsWith("*")) {//$NON-NLS-1$ - /* make sure it's not an escaped wildcard */ - if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') { - fHasTrailingStar= true; - } - } - - Vector temp= new Vector(); - - int pos= 0; - StringBuffer buf= new StringBuffer(); - while (pos < fLength) { - char c= fPattern.charAt(pos++); - switch (c) { - case '\\': - if (pos >= fLength) { - buf.append(c); - } else { - char next= fPattern.charAt(pos++); - /* if it's an escape sequence */ - if (next == '*' || next == '?' || next == '\\') { - buf.append(next); - } else { - /* not an escape sequence, just insert literally */ - buf.append(c); - buf.append(next); - } - } - break; - case '*': - if (buf.length() > 0) { - /* new segment */ - temp.addElement(buf.toString()); - fBound += buf.length(); - buf.setLength(0); - } - break; - case '?': - /* append special character representing single match wildcard */ - buf.append(fSingleWildCard); - break; - default: - buf.append(c); - } - } - - /* add last buffer to segment list */ - if (buf.length() > 0) { - temp.addElement(buf.toString()); - fBound += buf.length(); - } - - fSegments= new String[temp.size()]; - temp.copyInto(fSegments); - } - /** - * @param text a string which contains no wildcard - * @param start the starting index in the text for search, inclusive - * @param end the stopping point of search, exclusive - * @return the starting index in the text of the pattern , or -1 if not found - */ - protected int posIn(String text, int start, int end) {//no wild card in pattern - int max= end - fLength; - - if (!fIgnoreCase) { - int i= text.indexOf(fPattern, start); - if (i == -1 || i > max) - return -1; - return i; - } - - for (int i= start; i <= max; ++i) { - if (text.regionMatches(true, i, fPattern, 0, fLength)) - return i; - } - - return -1; - } - /** - * @param text a simple regular expression that may only contain '?'(s) - * @param start the starting index in the text for search, inclusive - * @param end the stopping point of search, exclusive - * @param p a simple regular expression that may contains '?' - * @return the starting index in the text of the pattern , or -1 if not found - */ - protected int regExpPosIn(String text, int start, int end, String p) { - int plen= p.length(); - - int max= end - plen; - for (int i= start; i <= max; ++i) { - if (regExpRegionMatches(text, i, p, 0, plen)) - return i; - } - return -1; - } - - - protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) { - while (plen-- > 0) { - char tchar= text.charAt(tStart++); - char pchar= p.charAt(pStart++); - - /* process wild cards */ - if (!fIgnoreWildCards) { - /* skip single wild cards */ - if (pchar == fSingleWildCard) { - continue; - } - } - if (pchar == tchar) - continue; - if (fIgnoreCase) { - if (Character.toUpperCase(tchar) == Character.toUpperCase(pchar)) - continue; - // comparing after converting to upper case doesn't handle all cases; - // also compare after converting to lower case - if (Character.toLowerCase(tchar) == Character.toLowerCase(pchar)) - continue; - } - return false; - } - return true; - } - /** - * @param text the string to match - * @param start the starting index in the text for search, inclusive - * @param end the stopping point of search, exclusive - * @param p a string that has no wildcard - * @return the starting index in the text of the pattern , or -1 if not found - */ - protected int textPosIn(String text, int start, int end, String p) { - - int plen= p.length(); - int max= end - plen; - - if (!fIgnoreCase) { - int i= text.indexOf(p, start); - if (i == -1 || i > max) - return -1; - return i; - } - - for (int i= start; i <= max; ++i) { - if (text.regionMatches(true, i, p, 0, plen)) - return i; - } - - return -1; - } - - public static String[] convertFromString(String patterns, String separator) { - StringTokenizer tokenizer= new StringTokenizer(patterns, separator, true); - int tokenCount= tokenizer.countTokens(); - List result= new ArrayList(tokenCount); - boolean escape= false; - boolean append= false; - while (tokenizer.hasMoreTokens()) { - String token= tokenizer.nextToken().trim(); - if (separator.equals(token)) { - if (!escape) - escape= true; - else { - addPattern(result, separator); - append= true; - } - } else { - if (!append) - result.add(token); - else - addPattern(result, token); - append= false; - escape= false; - } - } - return (String[])result.toArray(new String[result.size()]); - } - - private static void addPattern(List list, String pattern) { - if (list.isEmpty()) - list.add(pattern); - else { - int index= list.size() - 1; - list.set(index, ((String)list.get(index)) + pattern); - } - } - - public static String convertToString(String[] patterns, String separator) { - int length= patterns.length; - StringBuffer strBuf= new StringBuffer(); - if (length > 0) - strBuf.append(escapeSeparator(patterns[0], separator)); - else - return ""; //$NON-NLS-1$ - int i= 1; - while (i < length) { - strBuf.append(separator); - strBuf.append(" "); //$NON-NLS-1$ - strBuf.append(escapeSeparator(patterns[i++], separator)); - } - return strBuf.toString(); - } - - private static String escapeSeparator(String pattern, String separator) { - int length= pattern.length(); - StringBuffer buf= new StringBuffer(length); - for (int i= 0; i < length; i++) { - char ch= pattern.charAt(i); - if (separator.equals(String.valueOf(ch))) - buf.append(ch); - buf.append(ch); - } - return buf.toString(); - - } - - public static String[] convertFromString(String patterns) { - return convertFromString(patterns, SEPARATOR); - } - - private static final String SEPARATOR= ","; //$NON-NLS-1$ -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ThreadUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ThreadUtil.java deleted file mode 100644 index 4faf4ee29d7..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ThreadUtil.java +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -/** - * Utility class for handling threads. - * - * @author Kelvin Low - * @since 1.0 - */ -public class ThreadUtil { - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private ThreadUtil() { - } - - /** - * Puts the current thread to sleep for a given duration. - * - * @param time - * The duration in milliseconds. - */ - public static void pause(long time) { - try { - Thread.sleep(time); - } catch (InterruptedException e) { - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/Timer.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/Timer.java deleted file mode 100644 index c0dc6361254..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/Timer.java +++ /dev/null @@ -1,49 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; -import com.ibm.icu.util.Calendar; - -/** - * A simple timer for tracking time. - * - * @author Jinhua Xi - * @since 1.0 - */ -public class Timer { - - private long initTime; - - private long startTime; - - private long endTime; - - public Timer() { - start(); - initTime = startTime; - } - - public void start() { - startTime = Calendar.getInstance().getTimeInMillis(); - } - - public void stop() { - endTime = Calendar.getInstance().getTimeInMillis(); - } - - public int getTime() { - return (int) (endTime - startTime); - } - - public int getTotalTime() { - return (int) (endTime - initTime); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/WarUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/WarUtil.java deleted file mode 100644 index ccd8a0a2c20..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/WarUtil.java +++ /dev/null @@ -1,57 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.File; -import java.io.IOException; - -import org.eclipse.core.runtime.IProgressMonitor; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.taskdefs.War; -import org.apache.tools.ant.types.FileSet; - - -public class WarUtil { - - /** - * Creates a war file. - * - * @param outputWarFile - * an absolute path to the target war file - * @param webAppDirectory - * an absolute path to a directory containing the files and sub - * directories to be wared - * @param monitor - * a progress monitor - * @throws IOException - * if an error occurs while creating the zip file - */ - public static void buildWarFile(String outputWarFile, String webAppDirectory, - IProgressMonitor monitor) throws IOException { - - try { - Project antProject = new Project(); - antProject.init(); - War warTask = new War(); - warTask.setProject(antProject); - warTask.setDestFile(new File(outputWarFile)); - warTask.setWebxml(new File(webAppDirectory + File.separator + "WEB-INF" //$NON-NLS-1$ - + File.separator + "web.xml")); //$NON-NLS-1$ - FileSet webFiles = new FileSet(); - webFiles.setDir(new File(webAppDirectory)); - warTask.addFileset(webFiles); - warTask.execute(); - } catch (Exception e) { - throw new IOException(e.getMessage()); - } - } -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/XMLUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/XMLUtil.java deleted file mode 100644 index 100ed59ca33..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/XMLUtil.java +++ /dev/null @@ -1,666 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXParseException; - -/** - * Utility class for processing XML documents. - * - * @author Kelvin Low - * @author Jinhua Xi - * @author Phong Nguyen Le - * @since 1.0 - */ -public class XMLUtil { - - /** - * XML declaration. - */ - public final static String XML_DECLARATION = ""; //$NON-NLS-1$ - - /** - * XML Escape characters. - */ - public final static String XML_AMP = "&"; //$NON-NLS-1$ - - public final static String XML_BACKSLASH = "\"; //$NON-NLS-1$ - - public final static String XML_APOS = "'"; //$NON-NLS-1$ - - public final static String XML_CR = " "; //$NON-NLS-1$ - - public final static String XML_GT = ">"; //$NON-NLS-1$ - - public final static String XML_LT = "<"; //$NON-NLS-1$ - - public final static String XML_LF = " "; //$NON-NLS-1$ - - public final static String XML_QUOT = """; //$NON-NLS-1$ - - public final static String XML_TAB = " "; //$NON-NLS-1$ - - private static final String CRLF = "\r\n"; //$NON-NLS-1$ - - private static final byte[] CRLF_BYTES = CRLF.getBytes(); - - /** - * Private constructor to prevent this class from being instantiated. All - * methods in this class should be static. - */ - private XMLUtil() { - } - - /** - * Clones the given DOM node into the given DOM document. - * - * @param node - * The DOM node to clone. - * @param doc - * The target DOM document. - * @return The cloned node in the target DOM document. - */ - public static Node cloneNode(Node node, Document doc) { - Node clone = null; - switch (node.getNodeType()) { - case Node.ELEMENT_NODE: - clone = doc.createElement(node.getNodeName()); - NamedNodeMap attrs = node.getAttributes(); - for (int i = 0; i < attrs.getLength(); i++) { - Node attrNode = attrs.item(i); - Attr attrClone = doc.createAttribute(attrNode.getNodeName()); - attrClone.setNodeValue(attrNode.getNodeValue()); - ((Element) clone).setAttributeNode(attrClone); - } - - // Iterate through each child nodes. - NodeList childNodes = node.getChildNodes(); - if (childNodes != null) { - for (int i = 0; i < childNodes.getLength(); i++) { - Node childNode = childNodes.item(i); - Node childClone = cloneNode(childNode, doc); - clone.appendChild(childClone); - } - } - break; - - case Node.TEXT_NODE: - case Node.CDATA_SECTION_NODE: - clone = doc.createTextNode(node.getNodeName()); - clone.setNodeValue(node.getNodeValue()); - break; - } - return clone; - } - - /** - * Escapes a XML attribute to make it XML parser friendly. - * - * @param str - * The XML attribute string. - * @return The escaped string. - */ - public static String escapeAttr(String str) { - if (str == null || str.length() == 0) - return ""; //$NON-NLS-1$ - StringBuffer sb = new StringBuffer(); - int len = str.length(); - for (int i = 0; i < len; i++) { - char ch = str.charAt(i); - switch (ch) { - case '<': - sb.append(XML_LT); - break; - case '&': - sb.append(XML_AMP); - break; - case '"': - sb.append(XML_QUOT); - break; - default: - sb.append(ch); - break; - } - } - return sb.toString(); - } - - /** - * Escapes the given string to make it XML parser friendly. - * - * @param str - * The source string. - * @return The escaped string. - */ - public static String escape(String str) { - if (str == null || str.length() == 0) - return ""; //$NON-NLS-1$ - StringBuffer sb = new StringBuffer(); - int len = str.length(); - for (int i = 0; i < len; i++) { - char ch = str.charAt(i); - switch (ch) { - case '<': - sb.append(XML_LT); - break; - case '>': - sb.append(XML_GT); - break; - case '&': - sb.append(XML_AMP); - break; - case '"': - sb.append(XML_QUOT); - break; - case '\'': - sb.append(XML_APOS); - break; - case '\r': - sb.append(XML_CR); - break; - case '\n': - sb.append(XML_LF); - break; - case '\\': - sb.append(XML_BACKSLASH); - break; - default: - sb.append(ch); - break; - } - } - return sb.toString(); - } - - /** - * Escapes the given string to make it XML parser friendly. - * - * @param str - * The source string. - * @param ignoreCRLF - * If true, do not escape the CR and LF characters. - * @return The escaped string. - */ - public static String escape(String str, boolean ignoreCRLF) { - if (str == null || str.length() == 0) - return ""; //$NON-NLS-1$ - StringBuffer sb = new StringBuffer(); - int len = str.length(); - for (int i = 0; i < len; i++) { - char ch = str.charAt(i); - switch (ch) { - case '<': - sb.append(XML_LT); - break; - case '>': - sb.append(XML_GT); - break; - case '&': - // This is to avoid the double escaping (see Bugzilla 179921) - if (!str.startsWith(XML_LT+"p/", i) && !str.startsWith(XML_APOS, i) //$NON-NLS-1$ - && !str.startsWith(XML_AMP, i)) - sb.append(XML_AMP); - else - sb.append(ch); - break; - case '"': - sb.append(XML_QUOT); - break; - case '\'': - sb.append(XML_APOS); - break; - case '\r': - if (ignoreCRLF) - sb.append(ch); - else - sb.append(XML_CR); - break; - case '\n': - if (ignoreCRLF) - sb.append(ch); - else - sb.append(XML_LF); - break; - default: - sb.append(ch); - break; - } - } - return sb.toString(); - } - - /** - * Unescapes the given XML string. - * - * @param str - * The source string. - * @return The escaped string. - */ - public static String unescape(String str) { - if (str == null || str.length() == 0) - return ""; //$NON-NLS-1$ - StringBuffer sb = new StringBuffer(); - int len = str.length(); - for (int i = 0; i < len; i++) { - char ch = str.charAt(i); - switch (ch) { - case '&': - if (str.startsWith(XML_LT, i)) { - sb.append('<'); - i += 3; - } else if (str.startsWith(XML_GT, i)) { - sb.append('>'); - i += 3; - } else if (str.startsWith(XML_AMP, i)) { - sb.append('&'); - i += 4; - } else if (str.startsWith(XML_QUOT, i)) { - sb.append('"'); - i += 5; - } else if (str.startsWith(XML_APOS, i)) { - sb.append("\'"); //$NON-NLS-1$ - i += 5; - } else if (str.startsWith(XML_CR, i)) { - sb.append('\r'); - i += 4; - } else if (str.startsWith(XML_LF, i)) { - sb.append('\n'); - i += 4; - } else { - sb.append(ch); - } - break; - default: - sb.append(ch); - break; - } - } - return sb.toString(); - } - - /** - * Writes the content of the given DOM document to the output stream. - * - * @param xmlDoc - * The DOM document. - * @param output - * The output stream. - * @throws IOException - * if an I/O error occur while accessing the output stream. - */ - public static void writeDocument(Document xmlDoc, OutputStream output) - throws IOException { - DataOutputStream out = new DataOutputStream(output); - writeNode(xmlDoc, "", out); //$NON-NLS-1$ - out.flush(); - } - - /** - * Writes the content of the given DOM document to the PrintWriter. - * - * @param xmlDoc - * The DOM document. - * @param pw - * The PrintWriter object. - * @throws IOException - * if an I/O error occur while accessing the output stream. - */ - public static void writeDocument(Document xmlDoc, PrintWriter pw) - throws IOException { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - DataOutputStream out = new DataOutputStream(os); - writeNode(xmlDoc, "", out); //$NON-NLS-1$ - out.flush(); - // FIXME! Need to specify encoding? - String s = os.toString(); - pw.write(s); - pw.flush(); - } - - /** - * Saves the content of the given DOM document to file. - * - * @param xmlDoc - * The DOM document. - * @param xmlFile - * The XML file. - * @throws IOException - * if an I/O error occur while accessing the output stream. - */ - public static void saveDocument(Document xmlDoc, String xmlFile) - throws IOException { - DataOutputStream out = new DataOutputStream(new FileOutputStream( - xmlFile)); - writeNode(xmlDoc, "", out); //$NON-NLS-1$ - out.flush(); - out.close(); - } - - /** - * Saves the given XML string to the given file. - * - * @param xmlStr - * The XML string. - * @param xmlFile - * The XML file. - * @throws IOException - * if an I/O error occur while accessing the output stream. - */ - public static void saveDocument(String xmlStr, String xmlFile) - throws IOException { - DataOutputStream out = new DataOutputStream(new FileOutputStream( - xmlFile)); - out.write(xmlStr.getBytes()); - out.flush(); - out.close(); - } - - /** - * Writes the given DOM tree node to the given output stream. - * - * @param node - * The DOM node. - * @param indent - * The string indentation (containing space characters). - * @param out - * The output stream. - * @throws IOException - * if an I/O error occur while accessing the output stream. - */ - private static void writeNode(Node node, String indent, DataOutputStream out) - throws IOException { - String text; - - switch (node.getNodeType()) { - case Node.DOCUMENT_NODE: - // Write the XML file signature. - out.write(StrUtil.getUTF8Bytes(XML_DECLARATION)); - out.write(CRLF_BYTES); - - // Iterate through each child nodes. - NodeList nodes = node.getChildNodes(); - if (nodes != null) { - for (int i = 0; i < nodes.getLength(); i++) { - writeNode(nodes.item(i), "", out); //$NON-NLS-1$ - } - } - break; - - case Node.ELEMENT_NODE: - String name = node.getNodeName(); - out.write(StrUtil.getUTF8Bytes(indent + "<" + name)); //$NON-NLS-1$ - NamedNodeMap attrs = node.getAttributes(); - for (int i = 0; i < attrs.getLength(); i++) { - Node attrNode = attrs.item(i); - out.write(StrUtil.getUTF8Bytes(" " + attrNode.getNodeName() //$NON-NLS-1$ - + "=\"" + escape(attrNode.getNodeValue()) + "\"")); //$NON-NLS-1$ //$NON-NLS-2$ - } - out.write(StrUtil.getUTF8Bytes(">")); //$NON-NLS-1$ - out.write(CRLF_BYTES); - - // Iterate through each child nodes. - NodeList childNodes = node.getChildNodes(); - if (childNodes != null) { - for (int i = 0; i < childNodes.getLength(); i++) { - writeNode(childNodes.item(i), indent, out); - } - } - out.write(StrUtil.getUTF8Bytes(indent + "")); //$NON-NLS-1$ //$NON-NLS-2$ - out.write(CRLF_BYTES); - - break; - - case Node.TEXT_NODE: - text = StrUtil.removeWhiteSpaceChars(node.getNodeValue()); - if (text.length() > 0) { - out.write(StrUtil.getUTF8Bytes(escape(text))); - } - break; - - case Node.CDATA_SECTION_NODE: - text = StrUtil.removeWhiteSpaceChars(node.getNodeValue()); - if (text.length() > 0) { - out.write(StrUtil.getUTF8Bytes("")); //$NON-NLS-1$ - out.write(CRLF_BYTES); - } - break; - - case Node.PROCESSING_INSTRUCTION_NODE: - out.write(StrUtil.getUTF8Bytes("")); //$NON-NLS-1$ //$NON-NLS-2$ - out.write(CRLF_BYTES); - break; - - case Node.ENTITY_REFERENCE_NODE: - out.write(StrUtil.getUTF8Bytes("&" + node.getNodeName() + ";")); //$NON-NLS-1$ //$NON-NLS-2$ - break; - } - } - - /** - * Returns the file location where the given SAX exception occurred. - * - * @param e - * The SAX parse exception. - * @return A string containing the file location where the exception - * occurred. - */ - public static String getLocationOfException(SAXParseException e) { - StringBuffer sb = new StringBuffer(); - sb.append("row "); //$NON-NLS-1$ - sb.append(e.getLineNumber()); - sb.append(", col "); //$NON-NLS-1$ - sb.append(e.getColumnNumber()); - - String systemId = e.getSystemId(); - if (systemId != null) { - int index = systemId.lastIndexOf('/'); - if (index != -1) { - systemId = systemId.substring(index + 1); - } - sb.append(" of XML document "); //$NON-NLS-1$ - sb.append(systemId); - } - - return sb.toString(); - } - - public static Document loadXml(File file) throws Exception { - DocumentBuilderFactory builderFactory = DocumentBuilderFactory - .newInstance(); - DocumentBuilder builder = builderFactory.newDocumentBuilder(); - - return builder.parse(file); - } - - public static Document createDocument() throws Exception { - DocumentBuilderFactory builderFactory = DocumentBuilderFactory - .newInstance(); - DocumentBuilder builder = builderFactory.newDocumentBuilder(); - return builder.newDocument(); - } - - /** - * text of a leaf node, without child element - * - * @param tag - * @return String - */ - public static String getNodeText(Element tag) { - String text = tag.toString(); - int i = text.indexOf(">"); //$NON-NLS-1$ - int j = text.lastIndexOf(" elements = new ArrayList(); - if (nodes != null) { - int size = nodes.getLength(); - for (int i = 0; i < size; i++) { - Node node = nodes.item(i); - if (node instanceof Element) { - elements.add(node); - } - } - } - - return elements.iterator(); - } - - private static class NodeIterator implements Iterator { - int currentIndex = -1; - - int size = 0; - - NodeList nodes = null; - - public NodeIterator(NodeList nodes) { - this.nodes = nodes; - if (nodes != null) - size = nodes.getLength(); - } - - public void remove() { - // Do nothing, this is a readonly iterator. - } - - public boolean hasNext() { - return currentIndex + 1 < size; - } - - public Object next() { - if (hasNext()) { - return nodes.item(++currentIndex); - } - - return null; - } - } - - /** - * iterator of all the children of the element - * - * @param tag - * @return Iterator - */ - public static Iterator childIterator(Element tag, String childTagName) { - NodeList nodes = tag.getElementsByTagName(childTagName); - return new NodeIterator(nodes); - } - - /** - * Gets the list of immediate child elements with the given tag name. - * - * @param element - * @param tagName - * @return list of {@link Element} objects - */ - public static List getChildElementsByTagName(Element element, String tagName) { - List elements = new ArrayList(); - NodeList list = element.getChildNodes(); - int size = list.getLength(); - if(size > 0) { - for (int i = 0; i < size; i++) { - Node node = list.item(i); - if(node instanceof Element) { - Element e = (Element) node; - if(e.getTagName().equals(tagName)) { - elements.add(e); - } - } - } - } - return elements; - } - - /** - * Gets the first element with the given tag name in the immediate child elements. - * - * @param element - * @param tagName - * @return - */ - public static Element getFirstChildElementByTagName(Node element, String tagName) { - NodeList list = element.getChildNodes(); - int size = list.getLength(); - if(size > 0) { - for (int i = 0; i < size; i++) { - Node node = list.item(i); - if(node instanceof Element) { - Element e = (Element) node; - if(e.getTagName().equals(tagName)) { - return e; - } - } - } - } - return null; - } - - public static String removeBOM(String xml) { - return xml.trim().replaceFirst("^([\\W]+)<", "<"); //$NON-NLS-1$ //$NON-NLS-2$ - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ZipUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ZipUtil.java deleted file mode 100644 index 5396843191e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ZipUtil.java +++ /dev/null @@ -1,106 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.utils; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import org.eclipse.core.runtime.IProgressMonitor; - -/** - * Utility class for reading and writing zip files. - * - * @author Kelvin Low - * @since 1.2 - */ -public class ZipUtil { - - /** - * Creates a zip file. - * - * @param zipFilePath - * an absolute path to the target zip file - * @param contentPath - * an absolute path to a directory containing the files and sub - * directories to be zipped - * @param monitor - * a progress monitor - * @throws IOException - * if an error occurs while creating the zip file - */ - public static void createZipFile(String zipFilePath, String contentPath, - IProgressMonitor monitor) throws IOException { - ZipOutputStream out = null; - try { - out = new ZipOutputStream(new FileOutputStream( - zipFilePath)); - File contentDir = new File(contentPath); - populateZipFile(out, contentDir.getAbsolutePath(), contentDir, - monitor); - } catch (IOException e) { - throw e; - } catch (Exception e) { - throw new IOException(e.getMessage()); - } - finally { - if (out != null) { - try { - out.close(); - } - catch (Exception e) { - } - } - } - } - - /** - * Populates a zip file with directories and files. - * - * @param out - * a zip file output stream - * @param rootPath - * a root path that is used to compute the relative paths of the - * zip content - * @param file - * a file or directory - * @param monitor - * a progress monitor - */ - public static void populateZipFile(ZipOutputStream out, String rootPath, - File file, IProgressMonitor monitor) throws IOException { - File[] files = file.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - if (files[i].isDirectory()) { - populateZipFile(out, rootPath, files[i], monitor); - } else { - String filePath = files[i].getAbsolutePath(); - FileInputStream in = new FileInputStream(filePath); - String relativePath = filePath - .substring(rootPath.length() + 1); - out.putNextEntry(new ZipEntry(relativePath)); - byte[] buffer = new byte[1024]; - int len; - while ((len = in.read(buffer)) > 0) { - out.write(buffer, 0, len); - } - out.closeEntry(); - in.close(); - } - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/package.html deleted file mode 100644 index 164d717abc6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides common clipboard, file, I18N, image, networking, string manipulation and threading services. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/AbstractSAXParser.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/AbstractSAXParser.java deleted file mode 100644 index 13218b004d5..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/AbstractSAXParser.java +++ /dev/null @@ -1,216 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.xml; - -import java.io.File; -import java.io.IOException; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.common.utils.NetUtil; -import org.eclipse.epf.common.utils.StrUtil; -import org.eclipse.epf.common.utils.XMLUtil; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -/** - * An abstract SAX parser that can be used to parse a single XML file or a - * directory of XML files. - * - * @author Kelvin Low - * @since 1.0 - */ -public abstract class AbstractSAXParser extends DefaultHandler { - - /** - * The logger used for logging warnings, errors and exceptions. - */ - protected Logger logger; - - /** - * The name of the current XML file being parsed. - */ - protected String xmlFile; - - /** - * The String buffer for accumulating text. - */ - protected StringBuffer strBuf; - - /** - * The XML validating flag. - */ - private boolean validating; - - /** - * Creates a new AbstractSaxParser given the validating flag. - * - * @param logger - * The logger for logging warnings and errors. - * @param validating - * If true, validate the XML document. - */ - public AbstractSAXParser(Logger logger, boolean validating) { - this.logger = logger; - this.validating = validating; - } - - /** - * Parses the given XML directory or file. - * - * @param xmlPath - * The XML directory or file. - */ - public void parse(String xmlPath) { - String pathName = StrUtil.replace(xmlPath, "%20", " "); //$NON-NLS-1$ //$NON-NLS-2$ - File path = new File(pathName); - File[] files = path.isFile() ? new File[] { path } : path.listFiles(); - if (files != null) { - for (int i = 0; i < files.length; i++) { - if (!files[i].isDirectory()) { - try { - parseFile(files[i].getAbsoluteFile()); - } catch (Exception e) { - if (logger != null) { - logger - .logError( - "Failed to parse \"" + files[i].getAbsolutePath() + '"', e); //$NON-NLS-1$ - } - } - } - } - } - } - - /** - * Parses the given XML file. - * - * @param xmlFile - * The XML file. - */ - protected void parseFile(File xmlFile) throws ParserConfigurationException, - IOException, SAXException { - // Create the SAX parser factory. - SAXParserFactory spf = SAXParserFactory.newInstance(); - - // Set the XML validating flag. - spf.setValidating(validating); - - // Create the SAX parser. - SAXParser saxParser = spf.newSAXParser(); - - // Get the SAX XML reader. - XMLReader xmlReader = saxParser.getXMLReader(); - - // Set the SAX parser handlers to this class. - xmlReader.setContentHandler(this); - xmlReader.setErrorHandler(this); - - // Instruct the SAX parser to parse the given XML file. - this.xmlFile = xmlFile.getAbsolutePath(); - xmlReader.parse(NetUtil.getUri(xmlFile)); - } - - /** - * Called when the XML parser starts to parse the document. - */ - public void startDocument() { - strBuf = new StringBuffer(); - } - - /** - * Called when the the XML parser encounters the chararacter data within a - * text element. - */ - public void characters(char[] buffer, int start, int length) { - strBuf.append(buffer, start, length); - } - - /** - * Called when the parser starts to parse each new element. - */ - public abstract void startElement(String namespaceURL, String localName, - String qname, Attributes attributes); - - /** - * Called when the XML parser reaches the end of the an element. - */ - public abstract void endElement(String namespaceURL, String localName, - String qname); - - /** - * Called when the XML parser reaches the end of the document. - */ - public void endDocument() { - } - - /** - * Logs the SAX parsing warning. - * - * @param e - * The SAX parse exception. - */ - public void warning(SAXParseException e) { - if (logger != null) { - logger - .logWarning("SAX parsing warning encountered at " //$NON-NLS-1$ - + XMLUtil.getLocationOfException(e) - + ": " + e.getMessage()); //$NON-NLS-1$ - } - } - - /** - * Logs the SAX parsing error. - * - * @param e - * The SAX parse exception. - */ - public void error(SAXParseException e) { - if (logger != null) { - logger - .logError("SAX parsing error encountered at " //$NON-NLS-1$ - + XMLUtil.getLocationOfException(e) - + ": " + e.getMessage()); //$NON-NLS-1$ - } - } - - /** - * Logs the SAX non-recoverable error and exits. - * - * @param e - * The SAX parse exception. - */ - public void fatalError(SAXParseException e) throws SAXException { - if (logger != null) { - logger - .logError("SAX parsing fatal error encountered at " //$NON-NLS-1$ - + XMLUtil.getLocationOfException(e) - + ": " + e.getMessage()); //$NON-NLS-1$ - logger.logError(e); - } - } - - /** - * Returns the current XML file that is being parsed. - * - * @return The name of the XML file. - */ - public String getXMLFile() { - return xmlFile; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/XSLTProcessor.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/XSLTProcessor.java deleted file mode 100644 index a595850fbec..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/XSLTProcessor.java +++ /dev/null @@ -1,449 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.common.xml; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileWriter; -import java.io.InputStream; -import java.io.Writer; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.eclipse.epf.common.CommonPlugin; - -/** - * A wrapper over the XSLT processor bundled with the JRE. - * - * @author Kelvin Low - * @since 1.0 - */ -public class XSLTProcessor { - - // If true, cache the compiled the XSL transformer with the compiled XSL - // templates. - private static boolean cacheXSL; - - // Caches the XSL transformers. - private static Map transformerCache; - - static { - String cacheXSLProperty = CommonPlugin.getDefault().getString( - "cacheXSL"); //$NON-NLS-1$ - if (cacheXSLProperty != null && !cacheXSLProperty.startsWith("[")) { //$NON-NLS-1$ - cacheXSL = Boolean.getBoolean(cacheXSLProperty); - } else { - cacheXSL = true; - } - if (cacheXSL) { - transformerCache = new HashMap(); - } - - // Increase the entity expansion line limit to handle a larger number of - // XML entities. - System.setProperty("entityExpansionLimit", "1000000"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * Default private constructor to prevent this class from being - * instantiated. - */ - private XSLTProcessor() { - } - - /** - * Executes the XSL transformation given the XSL source, XML source, target - * output and encoding. - * - * @param xslSource - * The XSL source. - * @param xmlSource - * The XML source. - * @param output - * The output target. - * @param params - * The parameters for the XSL transformation. - * @param encoding - * The target encoding. - */ - public static void transform(Source xslSource, Source xmlSource, - Writer output, Properties params, String encoding) throws Exception { - if (xslSource != null && xmlSource != null) { - Transformer transformer = null; - String xslFile = xslSource.getSystemId(); - if (cacheXSL && xslFile != null) { - CachedTransformer cachedTransformer = null; - synchronized (transformerCache) { - cachedTransformer = transformerCache.get(xslFile); - if (cachedTransformer == null) { - TransformerFactory factory = TransformerFactory - .newInstance(); - transformer = factory.newTransformer(xslSource); - transformerCache.put(xslFile, new CachedTransformer( - transformer, params)); - } else { - cachedTransformer.setParams(params); - transformer = cachedTransformer.getTransformer(); - } - } - } else { - TransformerFactory factory = TransformerFactory.newInstance(); - transformer = factory.newTransformer(xslSource); - - if (params != null && params.size() > 0) { - for (Iterator i = params.keySet().iterator(); i - .hasNext();) { - String paramName = (String) i.next(); - String paramValue = params.getProperty(paramName); - transformer.setParameter(paramName, paramValue); - } - } - } - - if (encoding != null && encoding.length() > 0) { - transformer.setOutputProperty("encoding", encoding); //$NON-NLS-1$ - } else { - transformer.setOutputProperty("encoding", "utf-8"); //$NON-NLS-1$ //$NON-NLS-2$ - } - transformer.transform(xmlSource, new StreamResult(output)); - } - } - - /** - * Executes the XSL transformation given the XSL source, XML source, target - * output and encoding. - * - * @param xslSource - * The XSL source. - * @param xmlSource - * The XML source. - * @param output - * The output target. - * @param encoding - * The target encoding. - */ - public static void transform(Source xslSource, Source xmlSource, - Writer output, String encoding) throws Exception { - transform(xslSource, xmlSource, output, null, encoding); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML source, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML source. - * @param output - * The output target. - * @param params - * The parameters for the XSL transformation. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, Source xmlSource, - Writer output, Properties params, String encoding) throws Exception { - InputStream xslInput = getXslInputStream(xslUri); - if (xslInput != null) { - StreamSource xslSource = new StreamSource(xslInput); - xslSource.setSystemId(new File(xslUri)); - transform(xslSource, xmlSource, output, params, encoding); - try { - xslInput.close(); - } catch (Exception e) { - } - } - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML source, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML source. - * @param output - * The output target. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, Source xmlSource, - Writer output, String encoding) throws Exception { - transform(xslUri, xmlSource, output, null, encoding); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param output - * The output target. - * @param params - * The parameters for the XSL transformation. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, String xmlStr, Writer output, - Properties params, String encoding) throws Exception { - InputStream xslInput = getXslInputStream(xslUri); - if (xslInput != null) { - StreamSource xslSource = new StreamSource(xslInput); - xslSource.setSystemId(new File(xslUri)); - - byte[] xml = xmlStr.getBytes("utf-8"); //$NON-NLS-1$ - ByteArrayInputStream xmlInput = new ByteArrayInputStream(xml); - StreamSource xmlSource = new StreamSource(xmlInput); - - transform(xslSource, xmlSource, output, params, encoding); - - try { - xslInput.close(); - xmlInput.close(); - } catch (Exception e) { - } - } - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param output - * The output target. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, String xmlStr, Writer output, - String encoding) throws Exception { - transform(xslUri, xmlStr, output, null, encoding); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param file - * The output file. - * @param params - * The parameters for the XSL transformation. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, String xmlStr, File file, - Properties params, String encoding) throws Exception { - FileWriter output = new FileWriter(file); - if (output != null) { - transform(xslUri, xmlStr, output, params, encoding); - try { - output.close(); - } catch (Exception e) { - } - } - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string, - * target output and encoding. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param file - * The output file. - * @param encoding - * The target encoding. - */ - public static void transform(String xslUri, String xmlStr, File file, - String encoding) throws Exception { - transform(xslUri, xmlStr, file, null, encoding); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML source - * and target output. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML source. - * @param params - * The parameters for the XSL transformation. - * @param output - * The output target. - */ - public static void transform(String xslUri, Source xmlSource, - Properties params, Writer output) throws Exception { - transform(xslUri, xmlSource, output, params, null); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML source - * and target output. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML source. - * @param output - * The output target. - */ - public static void transform(String xslUri, Source xmlSource, Writer output) - throws Exception { - transform(xslUri, xmlSource, output, null, null); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string - * and target output. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param params - * The parameters for the XSL transformation. - * @param output - * The output target. - */ - public static void transform(String xslUri, String xmlStr, - Properties params, Writer output) throws Exception { - transform(xslUri, xmlStr, output, params, null); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string - * and target output. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param output - * The output target. - */ - public static void transform(String xslUri, String xmlStr, Writer output) - throws Exception { - transform(xslUri, xmlStr, output, null, null); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string - * and target output file. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param params - * The parameters for the XSL transformation. - * @param output - * The output target. - */ - public static void transform(String xslUri, String xmlStr, - Properties params, File file) throws Exception { - transform(xslUri, xmlStr, file, params, null); - } - - /** - * Executes the XSL transformation given the XSL stylesheet URI, XML string - * and target output file. - * - * @param xslURI - * The XSL stylesheet URI. - * @param xmlStr - * The XML string. - * @param output - * The output target. - */ - public static void transform(String xslUri, String xmlStr, File file) - throws Exception { - transform(xslUri, xmlStr, file, null, null); - } - - /** - * Returns the XSL input stream given the XSL stylesheet URI. - * - * @param xslURI - * The XSL stylesheet URI. - */ - private static InputStream getXslInputStream(String xslUri) { - InputStream xslInput = null; - try { - xslInput = new FileInputStream(xslUri); - } catch (Exception e) { - if (xslInput == null) { - xslInput = XSLTProcessor.class.getClassLoader() - .getResourceAsStream(xslUri); - } - } - return xslInput; - } - -} - -/** - * A cached XSL Transformer object. - */ -class CachedTransformer { - - private Transformer transformer; - private Properties params; - - public CachedTransformer(Transformer transformer, Properties params) { - this.transformer = transformer; - setParams(params); - } - - public Transformer getTransformer() { - return transformer; - } - - public Properties getParams() { - return params; - } - - public void setParams(Properties params) { - if (params != this.params) { - transformer.clearParameters(); - for (Iterator i = params.keySet().iterator(); i.hasNext();) { - String paramName = (String) i.next(); - String paramValue = params.getProperty(paramName); - transformer.setParameter(paramName, paramValue); - } - this.params = params; - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/package.html b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/package.html deleted file mode 100644 index 6e3c33ecf8e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/xml/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides XML and XSLT processing services. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/.project b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/.project deleted file mode 100644 index ec6c14be74a..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.epf.richtext.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/build.properties deleted file mode 100644 index 77afc5688a0..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - license.html,\ - epl-v10.html diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/epl-v10.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/epl-v10.html deleted file mode 100644 index cb1073a4bad..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/epl-v10.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - -Eclipse Public License - Version 1.0 - - - - - -
- -

Eclipse Public License - v 1.0 -

- -

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER -THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, -REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE -OF THIS AGREEMENT.

- -

1. DEFINITIONS

- -

"Contribution" means:

- -

a) -in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and
-b) in the case of each subsequent Contributor:

- -

i) -changes to the Program, and

- -

ii) -additions to the Program;

- -

where -such changes and/or additions to the Program originate from and are distributed -by that particular Contributor. A Contribution 'originates' from a Contributor -if it was added to the Program by such Contributor itself or anyone acting on -such Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in conjunction -with the Program under their own license agreement, and (ii) are not derivative -works of the Program.

- -

"Contributor" means any person or -entity that distributes the Program.

- -

"Licensed Patents " mean patent -claims licensable by a Contributor which are necessarily infringed by the use -or sale of its Contribution alone or when combined with the Program.

- -

"Program" means the Contributions -distributed in accordance with this Agreement.

- -

"Recipient" means anyone who -receives the Program under this Agreement, including all Contributors.

- -

2. GRANT OF RIGHTS

- -

a) -Subject to the terms of this Agreement, each Contributor hereby grants Recipient -a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly -display, publicly perform, distribute and sublicense the Contribution of such -Contributor, if any, and such derivative works, in source code and object code -form.

- -

b) -Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free -patent license under Licensed Patents to make, use, sell, offer to sell, import -and otherwise transfer the Contribution of such Contributor, if any, in source -code and object code form. This patent license shall apply to the combination -of the Contribution and the Program if, at the time the Contribution is added -by the Contributor, such addition of the Contribution causes such combination -to be covered by the Licensed Patents. The patent license shall not apply to -any other combinations which include the Contribution. No hardware per se is -licensed hereunder.

- -

c) -Recipient understands that although each Contributor grants the licenses to its -Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program.

- -

d) -Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement.

- -

3. REQUIREMENTS

- -

A Contributor may choose to distribute the -Program in object code form under its own license agreement, provided that: -

- -

a) -it complies with the terms and conditions of this Agreement; and

- -

b) -its license agreement:

- -

i) -effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose;

- -

ii) -effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, such -as lost profits;

- -

iii) -states that any provisions which differ from this Agreement are offered by that -Contributor alone and not by any other party; and

- -

iv) -states that source code for the Program is available from such Contributor, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange.

- -

When the Program is made available in source -code form:

- -

a) -it must be made available under this Agreement; and

- -

b) a -copy of this Agreement must be included with each copy of the Program.

- -

Contributors may not remove or alter any -copyright notices contained within the Program.

- -

Each Contributor must identify itself as the -originator of its Contribution, if any, in a manner that reasonably allows -subsequent Recipients to identify the originator of the Contribution.

- -

4. COMMERCIAL DISTRIBUTION

- -

Commercial distributors of software may -accept certain responsibilities with respect to end users, business partners -and the like. While this license is intended to facilitate the commercial use -of the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create potential -liability for other Contributors. Therefore, if a Contributor includes the -Program in a commercial product offering, such Contributor ("Commercial -Contributor") hereby agrees to defend and indemnify every other -Contributor ("Indemnified Contributor") against any losses, damages and -costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense.

- -

For example, a Contributor might include the -Program in a commercial product offering, Product X. That Contributor is then a -Commercial Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under this -section, the Commercial Contributor would have to defend claims against the -other Contributors related to those performance claims and warranties, and if a -court requires any other Contributor to pay any damages as a result, the -Commercial Contributor must pay those damages.

- -

5. NO WARRANTY

- -

EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, -WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely -responsible for determining the appropriateness of using and distributing the -Program and assumes all risks associated with its exercise of rights under this -Agreement , including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations.

- -

6. DISCLAIMER OF LIABILITY

- -

EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF -THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGES.

- -

7. GENERAL

- -

If any provision of this Agreement is invalid -or unenforceable under applicable law, it shall not affect the validity or -enforceability of the remainder of the terms of this Agreement, and without -further action by the parties hereto, such provision shall be reformed to the -minimum extent necessary to make such provision valid and enforceable.

- -

If Recipient institutes patent litigation -against any entity (including a cross-claim or counterclaim in a lawsuit) -alleging that the Program itself (excluding combinations of the Program with -other software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the date -such litigation is filed.

- -

All Recipient's rights under this Agreement -shall terminate if it fails to comply with any of the material terms or -conditions of this Agreement and does not cure such failure in a reasonable -period of time after becoming aware of such noncompliance. If all Recipient's -rights under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive.

- -

Everyone is permitted to copy and distribute -copies of this Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The Agreement -Steward reserves the right to publish new versions (including revisions) of -this Agreement from time to time. No one other than the Agreement Steward has -the right to modify this Agreement. The Eclipse Foundation is the initial -Agreement Steward. The Eclipse Foundation may assign the responsibility to -serve as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The Program -(including Contributions) may always be distributed subject to the version of -the Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly stated -in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to -the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved.

- -

This Agreement is governed by the laws of the -State of New York and the intellectual property laws of the United States of -America. No party to this Agreement will bring a legal action under this -Agreement more than one year after the cause of action arose. Each party waives -its rights to a jury trial in any resulting litigation.

- -

- -
- - - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.properties deleted file mode 100644 index 6d29802becd..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.properties +++ /dev/null @@ -1,141 +0,0 @@ -# NLS_MESSAGEFORMAT_VAR - -# "featureName" property - name of the feature -featureName=EPF Richtext - -# "providerName" property - name of the company that provides the feature -providerName=EPF Project - -# "description" property - description of the feature -description= - -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=license.html - -# "license" property - text of the "Feature Update License" -# should be plain text version of license agreement pointed to be "licenseURL" -license=\ -Eclipse Foundation Software User Agreement\n\ -April 14, 2010\n\ -\n\ -Usage Of Content\n\ -\n\ -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ -OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ -USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ -AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ -NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ -AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ -AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ -OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ -TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ -BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ -\n\ -Applicable Licenses\n\ -\n\ -Unless otherwise indicated, all Content made available by the\n\ -Eclipse Foundation is provided to you under the terms and conditions of\n\ -the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ -provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ -For purposes of the EPL, "Program" will mean the Content.\n\ -\n\ -Content includes, but is not limited to, source code, object code,\n\ -documentation and other files maintained in the Eclipse Foundation source code\n\ -repository ("Repository") in software modules ("Modules") and made available\n\ -as downloadable archives ("Downloads").\n\ -\n\ - - Content may be structured and packaged into modules to facilitate delivering,\n\ - extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ - plug-in fragments ("Fragments"), and features ("Features").\n\ - - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ - in a directory named "plugins".\n\ - - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ - Each Feature may be packaged as a sub-directory in a directory named "features".\n\ - Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ - numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ - - Features may also include other Features ("Included Features"). Within a Feature, files\n\ - named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ -\n\ -The terms and conditions governing Plug-ins and Fragments should be\n\ -contained in files named "about.html" ("Abouts"). The terms and\n\ -conditions governing Features and Included Features should be contained\n\ -in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ -Licenses may be located in any directory of a Download or Module\n\ -including, but not limited to the following locations:\n\ -\n\ - - The top-level (root) directory\n\ - - Plug-in and Fragment directories\n\ - - Inside Plug-ins and Fragments packaged as JARs\n\ - - Sub-directories of the directory named "src" of certain Plug-ins\n\ - - Feature directories\n\ -\n\ -Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ -Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ -Update License") during the installation process. If the Feature contains\n\ -Included Features, the Feature Update License should either provide you\n\ -with the terms and conditions governing the Included Features or inform\n\ -you where you can locate them. Feature Update Licenses may be found in\n\ -the "license" property of files named "feature.properties" found within a Feature.\n\ -Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ -terms and conditions (or references to such terms and conditions) that\n\ -govern your use of the associated Content in that directory.\n\ -\n\ -THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ -TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ -SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ -\n\ - - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ - - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ - - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ - - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ - - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ -\n\ -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ -TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ -is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ -govern that particular Content.\n\ -\n\ -\n\Use of Provisioning Technology\n\ -\n\ -The Eclipse Foundation makes available provisioning software, examples of which include,\n\ -but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ -the purpose of allowing users to install software, documentation, information and/or\n\ -other materials (collectively "Installable Software"). This capability is provided with\n\ -the intent of allowing such users to install, extend and update Eclipse-based products.\n\ -Information about packaging Installable Software is available at\n\ -http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ -\n\ -You may use Provisioning Technology to allow other parties to install Installable Software.\n\ -You shall be responsible for enabling the applicable license agreements relating to the\n\ -Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ -in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ -making it available in accordance with the Specification, you further acknowledge your\n\ -agreement to, and the acquisition of all necessary rights to permit the following:\n\ -\n\ - 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ - the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ - extending or updating the functionality of an Eclipse-based product.\n\ - 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ - Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ - 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ - govern the use of the Installable Software ("Installable Software Agreement") and such\n\ - Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ - with the Specification. Such Installable Software Agreement must inform the user of the\n\ - terms and conditions that govern the Installable Software and must solicit acceptance by\n\ - the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ - indication of agreement by the user, the provisioning Technology will complete installation\n\ - of the Installable Software.\n\ -\n\ -Cryptography\n\ -\n\ -Content may contain encryption software. The country in which you are\n\ -currently may have restrictions on the import, possession, and use,\n\ -and/or re-export to another country, of encryption software. BEFORE\n\ -using any encryption software, please check the country's laws,\n\ -regulations and policies concerning the import, possession, or use, and\n\ -re-export of encryption software, to see if this is permitted.\n\ -\n\ -Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n -########### end of license property ########################################## diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.xml b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.xml deleted file mode 100644 index 7431296412a..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/feature.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - %description - - - - Copyright (c) 2009 IBM Corporation 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 -http://www.eclipse.org/legal/epl-v10.html - - - - %license - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/license.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/license.html deleted file mode 100644 index a9b560f44cd..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext.feature/license.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Eclipse.org Software User Agreement - - - -

Eclipse Foundation Software User Agreement

-

March 17, 2005

- -

Usage Of Content

- -

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS - (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND - CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE - OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR - NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND - CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

- -

Applicable Licenses

- -

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 - ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. - For purposes of the EPL, "Program" will mean the Content.

- -

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS - modules ("Modules") and made available as downloadable archives ("Downloads").

- -
    -
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • -
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • -
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins - and/or Fragments associated with that Feature.
  • -
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • -
- -

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and -Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module -including, but not limited to the following locations:

- -
    -
  • The top-level (root) directory
  • -
  • Plug-in and Fragment directories
  • -
  • Inside Plug-ins and Fragments packaged as JARs
  • -
  • Sub-directories of the directory named "src" of certain Plug-ins
  • -
  • Feature directories
  • -
- -

Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the -installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or -inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. -Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in -that directory.

- -

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE -OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

- - - -

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please -contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

- -

Cryptography

- -

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to - another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, - possession, or use, and re-export of encryption software, to see if this is permitted.

- -Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/.classpath b/extraplugins/epf-richtext/org.eclipse.epf.richtext/.classpath deleted file mode 100644 index 04683904632..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/.classpath +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/.project b/extraplugins/epf-richtext/org.eclipse.epf.richtext/.project deleted file mode 100644 index 92c4c271e3e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.epf.richtext - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/META-INF/MANIFEST.MF b/extraplugins/epf-richtext/org.eclipse.epf.richtext/META-INF/MANIFEST.MF deleted file mode 100644 index 03a85b447db..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.epf.richtext;singleton:=true -Bundle-Version: 1.6.0.qualifier -Bundle-ClassPath: richtext.jar -Bundle-Activator: org.eclipse.epf.richtext.RichTextPlugin -Bundle-Vendor: %providerName -Bundle-Localization: plugin -Require-Bundle: org.eclipse.core.runtime;visibility:=reexport, - org.eclipse.ui;visibility:=reexport, - org.eclipse.ui.forms;visibility:=reexport, - org.eclipse.jface.text;visibility:=reexport, - org.eclipse.ui.workbench.texteditor;visibility:=reexport, - org.eclipse.epf.common.ui;visibility:=reexport -Eclipse-LazyStart: true -Export-Package: org.eclipse.epf.richtext, - org.eclipse.epf.richtext.actions, - org.eclipse.epf.richtext.dialogs, - org.eclipse.epf.richtext.html, - org.eclipse.epf.richtext.preferences -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.html deleted file mode 100644 index 04a6d65fb9f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -About - - -

About This Content

- -

February 24, 2005

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

- - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.ini b/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.ini deleted file mode 100644 index 46909d4b218..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.ini +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2004, 2005 IBM Corporation. All Rights Reserved. -#------------------------------------------------------------------------------- - -# about.ini -# contains information about a feature -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# "%key" are externalized strings defined in about.properties -# This file does not need to be translated. - -# Property "aboutText" contains blurb for "About" dialog (translated) -aboutText=%featureText - -# Property "featureImage" contains path to feature image (32x32) -featureImage=application_32.gif - -# Property "appName" contains name of the application (translated) -appName=%featureName diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.mappings b/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.mappings deleted file mode 100644 index 2c7deba835c..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.mappings +++ /dev/null @@ -1,7 +0,0 @@ -# about.mappings -# contains fill-ins for about.properties -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file does not need to be translated. -# Usually generated at build time. - -0=1.5.0.4 diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.properties deleted file mode 100644 index cbb1618b0af..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/about.properties +++ /dev/null @@ -1,49 +0,0 @@ -# NLS_ENCODING=UNICODE -############################################################################### -# Copyright (c) 2009 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2008 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# ============================================================================== -# Do not change the properties between this line and the last line containing: -# %%% END OF TRANSLATED PROPERTIES %%% -# Instead, either redefine an existing property, or create a new property, -# append it to the end of the file, and change the code to use the new name. -# ============================================================================== - -# about.properties -# contains externalized strings for about.ini -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# fill-ins are supplied by about.mappings -# This file should be translated. - -featureName=EPF Richtext - -featureText=EPF Richtext\n\ -\n\ -Version: {0} \n\ -\n\ -(c) Copyright Eclipse contributors and others 2000, 2008. All Rights Reserved.\n\ -\n\ - -# ============================================================================== -# %%% END OF TRANSLATED PROPERTIES %%% -# The above properties have been shipped for translation. -# ============================================================================== diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/application_32.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/application_32.gif deleted file mode 100644 index e6ad7ccd75b..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/application_32.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/build.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext/build.properties deleted file mode 100644 index 2bbb410e56e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/build.properties +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################### -# Copyright (c) 2009 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -source.richtext.jar = src/ -output.richtext.jar = bin/ -bin.includes = richtext.jar,\ - icons/,\ - META-INF/,\ - rte/,\ - plugin.xml,\ - plugin.properties,\ - about.html,\ - about.ini,\ - about.mappings,\ - about.properties,\ - application_32.gif - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddCode.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddCode.gif deleted file mode 100644 index 9ff24e339c2..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddCode.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddImage.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddImage.gif deleted file mode 100644 index 4308a8a2ec7..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddImage.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddLink.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddLink.gif deleted file mode 100644 index 7b111960867..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddLink.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddOrderedList.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddOrderedList.gif deleted file mode 100644 index f9ae4154b12..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddOrderedList.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddTable.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddTable.gif deleted file mode 100644 index 20884628895..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddTable.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddUnorderedList.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddUnorderedList.gif deleted file mode 100644 index 9c44ec645ae..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/AddUnorderedList.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Bold.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Bold.gif deleted file mode 100644 index 2dc59878356..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Bold.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/ClearContent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/ClearContent.gif deleted file mode 100644 index 9ff6416063d..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/ClearContent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Copy.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Copy.gif deleted file mode 100644 index e9bc65e32a0..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Copy.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Cut.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Cut.gif deleted file mode 100644 index bd43144729a..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Cut.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/FindReplace.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/FindReplace.gif deleted file mode 100644 index c8f88716c46..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/FindReplace.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Indent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Indent.gif deleted file mode 100644 index 436e15369b7..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Indent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Italic.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Italic.gif deleted file mode 100644 index c9b5a4483a7..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Italic.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Outdent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Outdent.gif deleted file mode 100644 index edcda3eea36..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Outdent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Paste.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Paste.gif deleted file mode 100644 index 1c7668db98e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Paste.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/PastePlainText.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/PastePlainText.gif deleted file mode 100644 index d01a2297af7..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/PastePlainText.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Subscript.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Subscript.gif deleted file mode 100644 index a7b31aa064e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Subscript.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Superscript.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Superscript.gif deleted file mode 100644 index e4b266c5e53..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Superscript.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/TidyHTML.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/TidyHTML.gif deleted file mode 100644 index 36bc9df8e50..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/TidyHTML.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Underline.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Underline.gif deleted file mode 100644 index e2a96469cee..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/dtool16/Underline.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddCode.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddCode.gif deleted file mode 100644 index bdb813fc270..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddCode.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddImage.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddImage.gif deleted file mode 100644 index 0545213fbaa..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddImage.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLine.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLine.gif deleted file mode 100644 index 7f08dcf651e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLine.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLink.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLink.gif deleted file mode 100644 index e99194adefd..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddLink.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddOrderedList.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddOrderedList.gif deleted file mode 100644 index b6814c10a08..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddOrderedList.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddTable.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddTable.gif deleted file mode 100644 index d368859b9e6..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddTable.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddUnorderedList.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddUnorderedList.gif deleted file mode 100644 index a4fdfc9e461..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/AddUnorderedList.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Bold.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Bold.gif deleted file mode 100644 index 00df9e553e5..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Bold.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/ClearContent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/ClearContent.gif deleted file mode 100644 index 255832653fd..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/ClearContent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Copy.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Copy.gif deleted file mode 100644 index f32aceebb3e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Copy.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Cut.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Cut.gif deleted file mode 100644 index 7e8635c8ab4..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Cut.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/FindReplace.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/FindReplace.gif deleted file mode 100644 index 11257ecd23b..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/FindReplace.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Indent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Indent.gif deleted file mode 100644 index 78195d0743e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Indent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Italic.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Italic.gif deleted file mode 100644 index ad0cd11add5..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Italic.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyCenter.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyCenter.gif deleted file mode 100644 index eeabf0513de..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyCenter.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyFull.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyFull.gif deleted file mode 100644 index a90a3b8b141..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyFull.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyLeft.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyLeft.gif deleted file mode 100644 index e85469b5d7a..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyLeft.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyRight.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyRight.gif deleted file mode 100644 index 0005af11ea1..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/JustifyRight.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Outdent.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Outdent.gif deleted file mode 100644 index 406b94f2840..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Outdent.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Paste.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Paste.gif deleted file mode 100644 index 94d39a1af5c..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Paste.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/PastePlainText.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/PastePlainText.gif deleted file mode 100644 index d8f9895833e..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/PastePlainText.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/StrikeThrough.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/StrikeThrough.gif deleted file mode 100644 index a1035459470..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/StrikeThrough.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Subscript.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Subscript.gif deleted file mode 100644 index 1c0f7133c7d..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Subscript.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Superscript.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Superscript.gif deleted file mode 100644 index 32866349b8f..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Superscript.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/TidyHTML.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/TidyHTML.gif deleted file mode 100644 index adf2410fa60..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/TidyHTML.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Underline.gif b/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Underline.gif deleted file mode 100644 index e6476d6f45b..00000000000 Binary files a/extraplugins/epf-richtext/org.eclipse.epf.richtext/icons/full/etool16/Underline.gif and /dev/null differ diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/messages.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext/messages.properties deleted file mode 100644 index 1eeeb7bc043..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/messages.properties +++ /dev/null @@ -1,160 +0,0 @@ -############################################################################### -# Copyright (c) 2009 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -################################################################################ -# BEGIN NO TRANSLATION -############################################################################### -# !! DO NOT TRANSLATE THE FOLLOWING LINE !! -fontNameAction_CSS_Default=arial, helvetica, sans-serif -# !! DO NOT TRANSLATE THE FOLLOWING LINE !! -fontNameAction_CSS_Default_Mozilla=arial,helvetica,sans-serif -################################################################################ -# END NO TRANSLATION -################################################################################ - - - -# Font Style Names -fontStyle_normal=Normal -fontStyle_sectionHeading=Section Heading -fontStyle_subsectionHeading=Subsection Heading -fontStyle_subSubsectionHeading=Sub Subsection Heading -fontStyle_quote=Quote -fontStyle_codeSample=Code Sample - -# HTML Block Tags -blockTag_paragraph=Paragraph -blockTag_heading1=Heading 1 -blockTag_heading2=Heading 2 -blockTag_heading3=Heading 3 -blockTag_heading4=Heading 4 -blockTag_heading5=Heading 5 -blockTag_heading6=Heading 6 -blockTag_address=Address -blockTag_preformattedText=Preformatted Text - -# HTML Font Names -fontName_default=Default -fontName_arial=Arial -fontName_courierNew=Courier New -fontName_timesNewRoman=Times New Roman -fontName_verdana=Verdana - -# Rich Text Editor Tool Buttons -addHorizontalBarAction_toolTipText=Add Horizontal Bar -addImageAction_toolTipText=Add Image -addLineAction_toolTipText=Add Line -addLinkAction_toolTipText=Add Link -addOrderedListAction_toolTipText=Add Ordered List -addTableAction_toolTipText=Add Table -addUnorderedListAction_toolTipText=Add Unordered List -boldAction_toolTipText=Bold -clearContentAction_toolTipText=Clear Content -copyAction_toolTipText=Copy -cutAction_toolTipText=Cut -findReplaceAction_toolTipText=Find/Replace -indentAction_toolTipText=Indent -italicAction_toolTipText=Italic -justifyCenterAction_toolTipText=Justify Center -justifyFullAction_toolTipText=Justify Full -justifyLeftAction_toolTipText=Justify Left -justifyRightAction_toolTipText=Justify Right -outdentAction_toolTipText=Outdent -pasteAction_toolTipText=Paste -pastePlainTextAction_toolTipText=Paste as plain text -subscriptAction_toolTipText=Subscript -superscriptAction_toolTipText=Superscript -underlineAction_toolTipText=Underline -tidy_clean_text=Default Clean -tidy_cleaner_text=Clean MS HTML -tidy_cleanest_text=Clean Word 2000 HTML -tidy_clean_toolTipText=Clean with JTidy using default options -tidy_cleaner_toolTipText=Clean HTML of MS HTML -tidy_cleanest_toolTipText=Clean Word 2000 HTML -addCodeAction_toolTipText=Insert custom html (javascript or video) - -# Rich Text Editor Comboboxes -fontStyleAction_toolTipText=Set Font Style -blockTagAction_toolTipText=Set Block Tag -fontNameAction_toolTipText=Set Font -fontNameAction_DefaultFontName=Default font -fontSizeAction_toolTipText=Set Font Size - -# Rich Text Editor Context Menu Items -cutAction_text=&Cut -copyAction_text=C&opy -pasteAction_text=&Paste -pastePlainTextAction_text=Paste &as plain text - -# Rich Text Editor Tabs -richTextTab_text=Rich Text -richTextTab_toolTipText=Edit content in rich text -htmlTab_text=HTML -htmlTab_toolTipText=Edit content in HTML - -# Add Dialogs -addImageDialog_title=Add Image -addLinkDialog_title=Add Link -addTableDialog_title=Add Table -findReplaceDialog_title=Find/Replace -urlLabel_text=URL: -summaryLabel_text=Summary: -captionLabel_text=Caption: -rowsLabel_text=Rows: -columnsLabel_text=Columns: -widthLabel_text=Width: -tableStyleLabel_text=Style: -tableHeaderNone_text=Table with no headers -tableHeaderCols_text=Table with column headers -tableHeaderRows_text=Table with row headers -tableHeaderBoth_text=Table with column and row headers -browseButton_text=Browse... -addCodeDialog_title=Insert Custom Html -addCodeDialog_Msg=Input your html for javascript or video: - -# Clear Editor Content Dialog -clearContentDialog_title=Clear Editor Content Confirmation -clearContentDialog_text=Do you really want to clear the content of this rich text editor? - -# Find/Replace Dialog -findLabel_text=Find: -replaceLabel_text=Replace with: -optionsGroup_text=Options -caseSensitiveCheckbox_text=Case sensitive -wholeWordCheckbox_text=Whole word -directionGroup_text=Direction -forwardRadioButton_text=Forward -backwardRadioButton_text=Backward -findButton_text=Find -replaceButton_text=Replace -replaceFindButton_text=Replace/Find -replaceallButton_text=Replace All -# taken from org.eclipse.ui.workbench.texteditor -FindReplace_Status_noMatch_label=String Not Found - -# Preference Page -maxCharsPerLineLabel_text=Maximum characters per line: -indentHTMLCheckbox_text=Indent HTML tags -indentSizeLabel_text=Indent Size: -urlDisplayNameLabel_text=URL Display Name: - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/plugin.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext/plugin.properties deleted file mode 100644 index 3d5028ae5c0..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/plugin.properties +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################### -# Copyright (c) 2009 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -#------------------------------------------------------------------------------- -# Copyright (c) 2005, 2006 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -# Plug-in -pluginName=EPF Rich Text -providerName=Eclipse.org - -################################################################################ -# THE FOLLOWING PROPERTIES SHOULD NOT BE TRANSLATED!!! -################################################################################ - -# The HTML file used to render the Rich Text Editor. -RichText.editorHTML=rte.htm - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/blank.htm b/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/blank.htm deleted file mode 100644 index 765d74505d5..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/blank.htm +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.css b/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.css deleted file mode 100644 index 4912b2cb390..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.css +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright (c) 2005, 2006 IBM Corporation 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 - * - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial implementation - */ - -body { - background-image: none; - background-color: #ffffff; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - margin: 3px; - padding: 0px; -} - -p { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; -} - -h1 { - font-family: arial, helvetica, sans-serif; - font-size: large; -} - -h2 { - font-family: arial, helvetica, sans-serif; - font-size: 150%; -} - -h3 { - font-family: arial, helvetica, sans-serif; -} - -h4, h5, h6 { - font-family: arial, helvetica, sans-serif; -} - -a:link { - color: #003399; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-decoration: none; -} - -a:active { - color: #003399; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-decoration: underline; -} - -a:visited { - color: #003399; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-decoration: none; -} - -a:hover { - color: #ff0000; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-decoration: underline; -} - -ol { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - list-style-type: decimal; - margin-left: 30px; -} - -ol li { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-align: left -} - -ul { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - list-style-type: disc; - margin-left: 30px; - margin-top: 0px; -} - -ul li { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-align: left; -} - -table { - background-image: none; - background: #ffffff; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; -} - -tbody { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - valign: baseline; -} - -th { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-align: left; -} - -td { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; -} - -td ul { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - margin-bottom: 0px; - margin-left: 30px; -} - -.pageTitle { - background: #9999cc; - color: #ffffff; - font-size: 12pt; - font-weight: bold; - padding-bottom: 5px; - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; - text-align: left; -} - -.pageTitleSeparator { - background-color: #000000; - padding: 0px; -} - -.tab { - background-color: #5c81a7; - color: #ffffff; - font-family: verdana, arial, sans-serif; - font-size: 11px; - font-weight: bold; -} - -.activeTab { - background-color: #c8d7e3; - color: #293d6b; - font-family: verdana, arial, sans-serif; - font-size: 11px; - font-weight: bold; -} - -a.tab:link, a.tab:active, a.tab:visited { - color: #ffffff; - font-family: verdana, arial, sans-serif; - font-size: 11px; - font-weight: bold; -} - -a.tab:hover { - text-decoration: underline; -} - -.overview { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-weight: normal; - padding-bottom: 10px; - padding-left: 20px; - padding-right: 0px; - padding-top: 10px; -} - -.overviewTable { - background: #ffffff; - width: 100%; -} - -.overviewTable td { - padding-bottom: 5px; - padding-left: 5px; - padding-right: 5px; - padding-top: 5px; -} - -.overviewSeparator { - background-color: #000000; - padding: 0px; -} - -.expandCollapseText { - font-family: verdana, arial, sans-serif; - font-size: 8pt; - padding-left: 5px; - padding-right: 5px; -} - -.expandCollapseLink { - color: #333333; - padding-bottom: 5px; - text-decoration: none; -} - -.expandCollapseLink:hover { - color: #0000ff; - text-decoration: underline; -} - -.expandCollapseLink:visited { - color: #333333; -} - -.sectionHeading { - background-color: #98b1c4; - color: #ffffff; - cursor: hand; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; - padding-bottom: 2px; - padding-left: 2px; - padding-top: 2px; - text-decoration: none; -} - -.sectionContent { - padding-bottom: 0px; - padding-left: 0px; - padding-right: 0px; - padding-top: 0px; - text-align: right; -} - -.sectionTable { - border-bottom: #ccc solid 0px; - border-left: #ccc solid 1px; - border-right: #ccc solid 0px; - border-top: #ccc solid 1px; - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; - padding-top: 10px; - width: 100%; -} - -.sectionTableHeading { - background: #eee; - border-bottom: #ccc solid 1px; - border-left: #ccc solid 0px; - border-right: #ccc solid 1px; - border-top: #ccc solid 0px; - color: #333333; - height: 20; - text-align: left; - width: 20%; -} - -.sectionTableCell { - border-bottom: #ccc solid 1px; - border-left: #ccc solid 0px; - border-right: #ccc solid 1px; - border-top: #ccc solid 0px; -} - -.breakdownTable { - border-bottom: #ccc solid 0px; - border-left: #ccc solid 1px; - border-right: #ccc solid 0px; - border-top: #ccc solid 1px; - padding-bottom: 0px; - padding-left: 0px; - padding-right: 0px; - padding-top: 0px; - width: 100%; -} - -.breakdownTable th { - background: #eee; - border-bottom: #ccc solid 1px; - border-left: #ccc solid 0px; - border-right: #ccc solid 1px; - border-top: #ccc solid 0px; - color: #333333; - height: 20; - text-align: left; -} - -.breakdownTable td { - border-bottom: #ccc solid 1px; - border-left: #ccc solid 0px; - border-right: #ccc solid 1px; - border-top: #ccc solid 0px; -} - -.defaultTable { - border-bottom: #ccc solid 0px; - border-left: #ccc solid 0px; - border-right: #ccc solid 0px; - border-top: #ccc solid 0px; - padding-bottom: 0px; - padding-left: 0px; - padding-right: 0px; - padding-top: 0px; - width: 100%; -} - -.defaultTable td { - border-bottom: #ccc solid 0px; - border-left: #ccc solid 0px; - border-right: #ccc solid 0px; - border-top: #ccc solid 0px; - text-align: left; -} - -.subSectionHeading { - color: #333333; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; - text-decoration: none; -} - -.subSectionContent { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - text-decoration: none; -} - -.stepHeading { - background-color: #ffffff; - color: #293d6b; - cursor: hand; - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; - padding-bottom: 2px; - padding-left: 2px; - padding-top: 2px; - text-decoration: none; -} - -.stepContent { - border-bottom: #ccc solid 0px; - border-left: #ccc solid 0px; - border-right: #ccc solid 0px; - border-top: #ccc solid 0px; - padding-bottom: 5px; - padding-left: 0px; - padding-right: 0px; - padding-top: 0px; - text-align: right; -} - -.stepTable { - border-bottom: #999999 solid 1px; - border-left: #999999 solid 0px; - border-right: #999999 solid 0px; - border-top: #999999 solid 0px; - padding-bottom: 20px; - padding-left: 10px; - padding-right: 10px; - padding-top: 10px; - width: 100%; -} - -.stepTable td { - border: #ccc solid 0px; -} - -.stepSeparator { - background-color: #cccccc; - padding: 0px; -} - -.backToTopLink { - color: #fffff; - font-family: verdana, arial, sans-serif; - font-size: 8pt; - font-weight: normal; - margin: 0px; - padding-bottom: 10px; - text-align: middle; - text-decoration: none; -} - -.backToTopLink:hover { - color: #969; - text-decoration: underline; -} - -.backToTopLink:visited { - color: #5c81a7; - text-decoration: none; -} - -.copyright { - color: #7080b0; - font-family: verdana, arial, sans-serif; - font-size: 8pt; - font-weight: normal; - padding-left: 0px; - padding-right: 10px; - padding-top: 25px; - text-align: left; - width: 100%; -} - -.versionInfo { - color: #7080b0; - font-family: verdana, arial, sans-serif; - font-size: 8pt; - font-weight: normal; - padding-left: 10px; - padding-right: 0px; - padding-top: 25px; - text-align: right; -} - -.quote { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - font-style: italic; -} - -.codeSample { - font-family: courier; - font-size: 10pt; -} - -.elementLink { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #0000ff; -} - -.elementLinkWithType { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #0000ff; -} - -.elementLinkWithUserText { - font-family: arial, helvetica, sans-serif; - font-size: 10pt; - color: #0000ff; -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.html deleted file mode 100644 index 1c7c52e643e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.js b/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.js deleted file mode 100644 index 5d6d34da6ee..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.js +++ /dev/null @@ -1,1490 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -// Note: Mozilla/Firefox does not allow unprivileged scripts to invoke the cut, -// copy and paste commands. The Javascript must either be signed -// (see http://www.mozilla.org/projects/security/components/signed-scripts.html), -// or the users must change their preferences -// (see http://www.mozilla.org/editor/midasdemo/securityprefs.html). -// Alternatively, the users can use the ctrl-x, ctrl-c and ctrl-v keys. -//------------------------------------------------------------------------------ -// Note: The SWT component in eclipse 3.4.X and above has a bug that -// keyReleased event can't be notified to listener. See (https://bugs.eclipse.org/bugs/show_bug.cgi?id=280146). -// This issue has blocked EPF upgrade to 1.5.0.5. As a workaround, capture keyReleased event in -// Javascript. Once this issue is resolved in SWT, we need to resume it -var STATUS_NOP = 0; -var STATUS_INITIALIZED = 1; -var STATUS_MODIFIED = 2; -var STATUS_GET_TEXT = 3; -var STATUS_KEY_DOWN = 4; -var STATUS_KEY_UP = 5; -var STATUS_SELECT_TEXT = 6; -var STATUS_SELECT_CONTROL = 7; -var STATUS_SELECT_NONE = 8; -var STATUS_EXEC_CMD = 9; -var STATUS_REFORMAT_LINKS = 10; - -var KEY_ARROW_DOWN = 40; -var KEY_ARROW_LEFT = 37; -var KEY_ARROW_RIGHT = 39; -var KEY_ARROW_UP = 38; -var KEY_BACKSPACE = 8; -var KEY_END = 35; -var KEY_HOME = 36; -var KEY_PAGE_DOWN = 34; -var KEY_PAGE_UP = 33; -var KEY_TAB = 9; - -var KEY_B = 66; -var KEY_U = 85; -var KEY_I = 73; -var KEY_C = 67; -var KEY_F = 70; -var KEY_S = 83; -var KEY_V = 86; -var KEY_X = 88; -var KEY_Z = 90; - -var CMD_COPY = "copy"; -var CMD_CUT = "cut"; -var CMD_FIND_TEXT = "findText"; -var CMD_PASTE = "paste"; -var CMD_SAVE = "save"; -var CMD_SAVE_ALL = "saveAll"; - -var TABLE_HEADERS_NONE = 0; -var TABLE_HEADERS_COLS = 1; -var TABLE_HEADERS_ROWS = 2; -var TABLE_HEADERS_BOTH = 3; - -var BOLD = 1; -var ITALIC = BOLD << 1; -var UNDERLINE = ITALIC << 1; -var SUBSCRIPT = UNDERLINE << 1; -var SUPERSCRIPT = SUBSCRIPT << 1; - - -var editorId; -var editorCSS; -var baseHREF; -var supportRichTextEditing = true; -var editorDoc; -var selection; -var selectionRange; -var readOnly = false; -var initialized = false; -var modified = false; -var checkResizeElement; -var selectionInfo = null; - -// Initializes the editor. -function initEditor(id, css, baseURL) { - editorId = id; - editorCSS = css; - baseHREF = baseURL; - try { - enableRichTextEditing(''); - initialized = true; - setStatus(STATUS_INITIALIZED, null); - } - catch (e) { - supportRichTextEditing = false; - } -} - -var excludeModify = new Array(16, KEY_ARROW_DOWN, KEY_ARROW_LEFT, - KEY_ARROW_RIGHT, KEY_ARROW_UP, KEY_END, KEY_HOME, KEY_PAGE_DOWN, - KEY_PAGE_UP, KEY_TAB); - -function keyReleased(event) { - var keyCode = event.keyCode; - if (keyCode == 0 && !document.all) { - keyCode = event.charCode; - switch (keyCode) { - case 98: - keyCode = KEY_B; - break; - case 99: - keyCode = KEY_C; - break; - case 102: - keyCode = KEY_F; - break; - case 105: - keyCode = KEY_I; - break; - case 115: - keyCode = KEY_S; - break; - case 117: - keyCode = KEY_U; - break; - case 118: - keyCode = KEY_V; - break; - case 120: - keyCode = KEY_X; - break; - case 122: - keyCode = KEY_Z; - break; - } - } - var ctrlKey = event.ctrlKey; - var shiftKey = event.shiftKey; - var altKey = event.altKey; - - if ( !ctrlKey && !altKey ) { - var modified = true; - for (var i = 0; i < excludeModify.length; i++ ) { - if ( keyCode == excludeModify[i] ) { - modified = false; - break; - } - } - if ( modified == true ) { - setTimeout("setStatus(STATUS_MODIFIED, null);", 10); - } - } -} - -// Handles the key events. -function keyPressed(event) { - var keyCode = event.keyCode; - if (keyCode == 0 && !document.all) { - keyCode = event.charCode; - switch (keyCode) { - case 98: - keyCode = KEY_B; - break; - case 99: - keyCode = KEY_C; - break; - case 102: - keyCode = KEY_F; - break; - case 105: - keyCode = KEY_I; - break; - case 115: - keyCode = KEY_S; - break; - case 117: - keyCode = KEY_U; - break; - case 118: - keyCode = KEY_V; - break; - case 120: - keyCode = KEY_X; - break; - case 122: - keyCode = KEY_Z; - break; - } - } - var ctrlKey = event.ctrlKey; - var shiftKey = event.shiftKey; - - switch(keyCode) { - case KEY_ARROW_DOWN: - case KEY_ARROW_LEFT: - case KEY_ARROW_RIGHT: - case KEY_ARROW_UP: - case KEY_END: - case KEY_HOME: - case KEY_PAGE_DOWN: - case KEY_PAGE_UP: - break; - case KEY_TAB: - if ( readOnly || !ctrlKey) - break; - - var editorWindow = document.getElementById(editorId).contentWindow; - var editorDocument = editorWindow.document; - var tabText = "    "; - - if(document.all ){ - event.keyCode = -1; - event.returnValue=false; //IE: cancel the default behavior - var rng=editorDocument.selection.createRange(); - rng.pasteHTML(tabText); //insert 4 spaces for one tab key - } else { - event.preventDefault(); - editorDoc.execCommand("insertHTML","",tabText); - } - - setTimeout("setStatus(STATUS_MODIFIED, null);", 10); - break; - case KEY_BACKSPACE: - if (!readOnly) { - setTimeout("setStatus(STATUS_MODIFIED, null);", 10); - } - break; - case KEY_B: - case KEY_U: - case KEY_I: - if (!readOnly && ctrlKey) { - setTimeout("setStatus(STATUS_MODIFIED, null);",10); - } - break; - case KEY_C: - if (ctrlKey) { - setStatus(STATUS_KEY_DOWN, CMD_COPY); - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - case KEY_F: - if (ctrlKey) { - if (document.all) { - event.keyCode = -1; - event.returnValue = false; - } - else { - event.preventDefault(); - } - setStatus(STATUS_KEY_DOWN, CMD_FIND_TEXT); - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - case KEY_S: - if (!readOnly && ctrlKey) { - if (document.all) { - event.keyCode = -1; - event.returnValue = false; - } - else { - event.preventDefault(); - } - if (shiftKey) { - setStatus(STATUS_KEY_DOWN, CMD_SAVE_ALL); - } - else { - setStatus(STATUS_KEY_DOWN, CMD_SAVE); - } - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - case KEY_V: - if (ctrlKey) { - if (document.all) { - event.keyCode = -1; - event.returnValue = false; - if (!readOnly) { - setStatus(STATUS_KEY_DOWN, CMD_PASTE); - } - } - else { - if (!readOnly) { - // Workaround Mozilla/Firefox paste issues. - setTimeout("setStatus(STATUS_KEY_DOWN, CMD_PASTE);", 10); - } - else { - event.preventDefault(); - } - } - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - case KEY_X: - if (ctrlKey) { - setStatus(STATUS_KEY_DOWN, CMD_CUT); - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - case KEY_Z: - if (!readOnly && ctrlKey) { - setTimeout("setStatus(STATUS_MODIFIED, null);", 10); - } - else if (!document.all && readOnly) { - event.preventDefault(); - } - break; - default: - if (!document.all && readOnly) { - event.preventDefault(); - } - } -} - -function selChanged(event) { - updateSelection(); -} - -function enableRichTextEditing(html) { - var doc = document.getElementById(editorId).contentWindow.document; - doc.designMode = "on"; - - var htmlSrc = ''; - - if (editorCSS != null && editorCSS != '') { - htmlSrc += ''; - } - - if (baseHREF != null && baseHREF != '') { - htmlSrc += ''; - } - - if (!document.all && html == '') { - // Mozilla/Firefox will only display the caret if
is added to the HTML body. - // Adding
also enables the backspace and delete key by default. Otherwise, the - // user need to enter some text before these 2 keys start to function. - html = "
"; - } - - htmlSrc += '' + html + ''; - - doc.open(); - doc.write(htmlSrc); - doc.close(); - - modified = false; - - if ("attachEvent" in doc) { - doc.attachEvent("onkeydown", keyPressed); - doc.attachEvent("onkeyup", keyReleased); - doc.attachEvent("onselectionchange", selChanged); - // for DnD (internal) - doc.body.attachEvent("ondrop", checkModified); - // for image/table resizing: - doc.body.attachEvent("onresizeend", checkModified); - } - if ("addEventListener" in doc) { - doc.addEventListener("keypress", keyPressed, true); - doc.addEventListener("keyrelease", keyReleased, true); - doc.addEventListener("keypress", selChanged, false); - doc.addEventListener("mouseup", selChanged, false); - doc.addEventListener("dragdrop", checkModified, false); - - // check mouseup event for image/table resizing - doc.addEventListener("mouseup", checkModified, false); - } - - setStatus(STATUS_EXEC_CMD, 1); -} - -// this one is for modification check on drag n drop within the RTE -// checkModified listener -function checkModified(event) { - setTimeout("setStatus(STATUS_MODIFIED, null);", 10); -} - -// Sets the height of the editor. -function setHeight(height) { - if (initialized) { - document.getElementById(editorId).height = height + "px"; - } -} - -// Sets the status. -// Note: By default, Firefox disables changes to the status bar. For this to work, the user -// must set the global preference "dom.disable_window_status_change" to false. -// For Firefox 1.0.x, this setting can be made in /usr/firefox-1.0.7/defaults/pref/firefox.js. -function setStatus(type, value) { - var status = '$$$' + type; - if (value != null && value != '') { - status += ('$' + value); - } - window.status = status; - window.status = '$$$' + STATUS_NOP; -} - -// Returns the HTML source. -function getHTML() { - var html = document.getElementById(editorId).contentWindow.document.body.innerHTML; - if (html == "

 

") { - html = ""; - } - if (html != null && html != '') { - var regEx = new RegExp("\"file\:([^=]*)(/resources/)([^\"]+)\"", "g"); - html = html.replace(regEx, "\"./resources/$3\""); - regEx = new RegExp("\"file\:([^=]*)/#([^\"]+)\"", "g"); - html = html.replace(regEx, "\"#$2\""); - } - return html; -} - -//Returns the HTML source to the Java layer -function getText() { - var html = getHTML(); - setStatus(STATUS_GET_TEXT, html); - return html; -} - -function setInnerHTML(html) { - if (document.all) { - // IE has problem setting complex HTML set via doc.body.innerHTML. - enableRichTextEditing(html); - } - else { - if (html == '') { - // Mozilla/Firefox will only display the caret if
is added to the HTML body. - html = "
"; - } - var doc = document.getElementById(editorId).contentWindow.document; - if (doc.body != null) { - doc.body.innerHTML = html; - } - else { - // Mozilla/Firefox can take a while to initialize document.body - // after document.write(). - try { - setTimeout("setInnerHTML('" + html + "');", 10); - } - catch (e) { - } - } - } -} - -// Sets the HTML source. -function setText(html) { - if (supportRichTextEditing) { - html = decodeString(html); - selectionInfo = getSelectionInfo(); - setInnerHTML(html); - if (selectionInfo != null) { - setTimeout("setSelection(selectionInfo);", 10); - } - modified = false; - setStatus(STATUS_EXEC_CMD, 1); - } -} - -function setSelection(selectionInfo) { - if (!supportRichTextEditing) { - return; - } - - contentWindow = document.getElementById(editorId).contentWindow; - editorDoc = contentWindow.document; - - try { - if (document.all) { - var startOffset = selectionInfo.start; - var len = selectionInfo.len; - if (startOffset == 0 && len == 0) { - return; - } - var tempRange = editorDoc.body.createTextRange(); - tempRange.moveStart('character', startOffset); - tempRange.collapse(); - tempRange.moveEnd('character', len); - tempRange.select(); - tempRange.scrollIntoView(); - } else { - selection = this.window.getSelection(); - var startContainer = selectionInfo.startContainer; - var start = selectionInfo.start; - var endContainer = selectionInfo.endContainer; - var end = selectionInfo.end; - var tempRange = document.createRange(); - tempRange.setStart(startContainer, start); - tempRange.setEnd(endContainer, end); - selection.removeAllRanges(); - selection.addRange(tempRange); - contentWindow.focus(); - } - } catch (e) { - } -} - -function getSelectionInfo() { - if (!supportRichTextEditing) { - return null; - } - - contentWindow = document.getElementById(editorId).contentWindow; - editorDoc = contentWindow.document; - - var tempSelRange; - try { - if (document.all) { - selection = editorDoc.selection; - if (selection != null) { - tempSelRange = selection.createRange(); - } - // length of selection - var tempSelLen = tempSelRange.text.length; - // create new range - var tempRange = editorDoc.body.createTextRange(); - // set end of new range to start of selection - // this will throw an exception if tempSelRange is not in editor.doc.body (ie, at the start of the RTE). - tempRange.setEndPoint("EndToStart", tempSelRange); - // length of new range is the start offset - var tempText = tempRange.text; - // IE counts newlines as 2 characters for length property, but they count as 1 when using moveStart so remove the \r to make the count the same - tempText = tempText.replace(/\r/g, ""); - var startOffset = tempText.length; - - return {start:startOffset, len:tempSelLen}; - } else { - selection = contentWindow.getSelection(); - if (selection != null) { - tempSelRange = selection.getRangeAt(selection.rangeCount - 1).cloneRange(); - } - return {startContainer: tempSelRange.startContainer, start:tempSelRange.startOffset, - endContainer: tempSelRange.endContainer, end:tempSelRange.endOffset}; - } - } catch (e) { - return null; - } -} - -// Decodes the HTML passed from the Java layer. -function decodeString(str) { - if (str != null && str != '') { - if (document.all) { - str = str.replace(/%sq%/g, "'"); - str = str.replace(/%EOL%/g, "\n"); - } - else { - str = str.replace(/%sq%/g, "'"); - str = str.replace(/%EOL%/g, ""); - str = str.replace(/\n/g, ""); - } - } - return str; -} - -// updates selection without notifying the Java layer of the selection state -function internalUpdateSelection() { - if (!supportRichTextEditing) { - return false; - } - - contentWindow = document.getElementById(editorId).contentWindow; - editorDoc = contentWindow.document; - - if (document.all) { - selection = editorDoc.selection; - if (selection != null) { - selectionRange = selection.createRange(); - reformatElementLinks(); - } - } - else { - selection = contentWindow.getSelection(); - if (selection != null) { - selectionRange = selection.getRangeAt(selection.rangeCount - 1).cloneRange(); - if (selectionRange.startContainer.nodeName == "HTML" && - selectionRange.endContainer.nodeName == "HTML") { - // Mozilla selects the whole document when there's no RTE content, so select just the body - selectionRange = editorDoc.createRange(); - selectionRange.setStart(editorDoc.body, 0); - selectionRange.setEnd(editorDoc.body, 0); - } - } - } - return true; -} - -// Updates the current selection and selection range. -function updateSelection() { - if (!supportRichTextEditing) { - return false; - } - - contentWindow = document.getElementById(editorId).contentWindow; - editorDoc = contentWindow.document; - - var tempSelRange; - var selOffsetStart = 0; - var selectedText = ""; - var fontName = ""; - var fontSize = ""; - var blockStyle = ""; - var textFlags = 0; - - - if (document.all) { - selection = editorDoc.selection; - if (selection != null) { - selectionRange = selection.createRange(); - if (selectionRange != null && selection.type != "Control") { - tempSelRange = selectionRange.duplicate(); - } - reformatElementLinks(); - } - } - else { - selection = contentWindow.getSelection(); - if (selection != null) { - selectionRange = selection.getRangeAt(selection.rangeCount - 1).cloneRange(); - tempSelRange = selectionRange.cloneRange(); - } - } - if (tempSelRange != null) { - try { - if (document.all) { - if (selectionRange.text) { - selectedText = selectionRange.text; - } - /* for getting selection offset - commented because we can't select the - * proper location in the HTML source tab because JTidy's reformatting of the HTML - var html = getHTML(); - var tempSelLen = tempSelRange.htmlText.length; - tempSelRange.moveStart('character', -html.length); - selOffsetStart = tempSelRange.htmlText.length - tempSelLen; - */ - var selParent = tempSelRange.parentElement(); - fontName = tempSelRange.queryCommandValue('fontName'); - fontSize = tempSelRange.queryCommandValue('fontSize'); - blockStyle = tempSelRange.queryCommandValue('formatBlock'); - if (blockStyle == "Normal") { - if (selParent.className == "quote") { - blockStyle = ""; - } else if (selParent.className == "codeSample") { - blockStyle = ""; - } else { - blockStyle = "

"; - } - } else if (blockStyle == "Heading 3") { - blockStyle = "

"; - } else if (blockStyle == "Heading 4") { - blockStyle = "

"; - } else if (blockStyle == "Heading 5") { - blockStyle = "

"; - } else if (blockStyle == "" || blockStyle == null) { - blockStyle = "

"; - } - if (tempSelRange.queryCommandValue('bold') == true) { - textFlags |= BOLD; - } - if (tempSelRange.queryCommandValue('italic') == true) { - textFlags |= ITALIC; - } - if (tempSelRange.queryCommandValue('underline') == true) { - textFlags |= UNDERLINE; - } - if (tempSelRange.queryCommandValue('subscript') == true) { - textFlags |= SUBSCRIPT; - } - if (tempSelRange.queryCommandValue('superscript') == true) { - textFlags |= SUPERSCRIPT; - } - setStatus(STATUS_SELECT_TEXT, /* selOffsetStart + "$" + */ - fontName + "$" + fontSize + "$" + blockStyle + "$" + textFlags + "$" + selectedText); - } else { - if (selectionRange != null) { - selectedText = selectionRange.toString(); - } - var selParent = selection.focusNode; - fontName = editorDoc.queryCommandValue('fontName'); - if (fontName == "") { - fontName = "default"; - } - fontSize = editorDoc.queryCommandValue('fontSize'); - if (fontSize == "") { - fontSize = "default"; - } - blockStyle = editorDoc.queryCommandValue('formatBlock'); - if (blockStyle == "p") { - if (selParent.parentNode.className == "quote") { - blockStyle = ""; - } else if (selParent.parentNode.className == "codeSample") { - blockStyle = ""; - } else { - blockStyle = "

"; - } - } else if (blockStyle == "h3") { - blockStyle = "

"; - } else if (blockStyle == "h4") { - blockStyle = "

"; - } else if (blockStyle == "h5") { - blockStyle = "

"; - } else if (blockStyle == "") { - blockStyle = "

"; - } - if (editorDoc.queryCommandState('bold') == true) { - textFlags |= BOLD; - } - if (editorDoc.queryCommandState('italic') == true) { - textFlags |= ITALIC; - } - if (editorDoc.queryCommandState('underline') == true) { - textFlags |= UNDERLINE; - } - if (editorDoc.queryCommandState('subscript') == true) { - textFlags |= SUBSCRIPT; - } - if (editorDoc.queryCommandState('superscript') == true) { - textFlags |= SUPERSCRIPT; - } - setStatus(STATUS_SELECT_TEXT, /* selOffsetStart + "$" + */ - fontName + "$" + fontSize + "$" + blockStyle + "$" + textFlags + "$" + selectedText); - } - } catch (e) { } - } - - return true; -} - -// Sets focus to this editor. -function setFocus() { - if (!supportRichTextEditing) { - return; - } - if (document.all) { - iframe = document.getElementById(editorId); - iframe.focus(); - } else { - contentWindow = document.getElementById(editorId).contentWindow; - contentWindow.focus(); - } - setStatus(STATUS_EXEC_CMD, 1); -} - -// Reformats element links created via drag & drop. -function reformatElementLinks() { - var linksReformatted = 0; - var elements = editorDoc.getElementsByTagName('A'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.className.toLowerCase() == 'elementlink' || - element.className.toLowerCase() == 'elementlinkwithtype' || - element.className.toLowerCase() == 'elementlinkwithusertext') { - if (element.firstChild != null && element.firstChild.firstChild != null && - element.firstChild.firstChild.firstChild != null) { - var linkText = element.firstChild.firstChild.firstChild.nodeValue; - element.removeChild(element.firstChild); - element.appendChild(editorDoc.createTextNode(linkText)); - linksReformatted++; - } - } - } - if (linksReformatted > 0) { - setStatus(STATUS_REFORMAT_LINKS, null); - } -} - -// Formats the selected text. -function formatText(command, option) { - if (!readOnly && internalUpdateSelection()) { - if (editorDoc.execCommand(command, false, option)) { - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - } -} - -// Adds HTML. -function addHTML(html) { - if (!readOnly && html != "") { - html = decodeString(html); - if (internalUpdateSelection()) { - if (document.all) { - if (selectionRange.text != null) { - selectionRange.pasteHTML(html); - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - } - else { - selectionRange.deleteContents(); - var documentFragment = selectionRange.createContextualFragment(html); - selectionRange.insertNode(documentFragment); - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - } - } -} - -// Adds an image. -function addImage(url, height, width, alt) { - if (internalUpdateSelection()) { - if (document.all) { - if (url != null && url != '') { - formatText('insertimage', url); - } - if (selection != null && selection.type == 'Control' && selectionRange != null) { - if (height != null && height != '') selectionRange.item().height = height; - if (width != null && width != '') selectionRange.item().width = width; - if (alt != null) selectionRange.item().alt = alt; - } - } else { - var START_MARKER = "A_-_-_"; - var END_MARKER = ":.:.:"; - // mark img links with START_MARKER + id + END_MARKER in the id, for later recovery - var elements = editorDoc.getElementsByTagName('img'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.id = START_MARKER + element.id + END_MARKER; - } - if (url != null && url != '') { - formatText('insertimage', url); - } - if (internalUpdateSelection()) { - var regExID = new RegExp(START_MARKER + "(.*?)" + END_MARKER); - var elements = editorDoc.getElementsByTagName('img'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - var id = element.id; - if (id != null && id != '') { - RegExp.lastIndex=0; - var matchArray = id.match(regExID); - if (matchArray != null && matchArray.length > 0) { - var newId = matchArray[1]; - if (newId.length > 0) { - element.id = newId; - } else { - element.removeAttribute('id'); - } - } - } else { - // no id, must be the new img - if (height != null && height != '') element.height = height; - if (width != null && width != '') element.width = width; - if (alt != null) element.alt = alt; - } - } - } - } - setStatus(STATUS_MODIFIED, null); - } -} - -// Adds a horizontal line. -function addLine() { - formatText('inserthorizontalrule', null); -} - -// Adds a link. -function addLink(url) { - if (!readOnly && url != null && url != '' && internalUpdateSelection()) { - if (document.all) { - if (selectionRange.text == null || selectionRange.text == '') { - selectionRange.text = url; - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - else if (selectionRange.execCommand('createlink', false, url)) { - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - } - else { - if (selection == null || selection == "") { - var urlTextNode = editorDoc.createTextNode(url); - insertNodeAtSelection(document.getElementById(editorFrameId).contentWindow, urlTextNode); - } - if (editorDoc.execCommand('createlink', false, url)) { - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - } - } -} - -// Adds an ordered list. -function addOrderedList() { - formatText('insertorderedlist', null); -} - -// Adds a table. -function addTable(rows, cols, width, summary, caption, tableheaders) { - if (readOnly) return; - if (rows == 0) rows = 2; - if (cols == 0) cols = 2; - if (width == 0) width = "85%"; - if (internalUpdateSelection()) { - var table = editorDoc.createElement("table"); - table.cellPadding = "2"; - table.cellSpacing = "0"; - table.border = "1"; - table.width = width; - table.title = ""; - if (summary != null && summary != '') { - table.summary = summary; - } - if (caption != null && caption != '') { - table.title = caption; - table.createCaption(); - var captionNode = editorDoc.createTextNode(caption); - table.caption.appendChild(captionNode); - } - tbody = editorDoc.createElement("tbody"); - for (var i = 0; i < rows; i++) { - tr = editorDoc.createElement("tr"); - for (var j = 0; j < cols; j++) { - if (i == 0 && (tableheaders == TABLE_HEADERS_COLS || tableheaders == TABLE_HEADERS_BOTH)) { - th = editorDoc.createElement("th"); - th.scope = "col"; - th.id = ""; - th.abbr = th.id; - var headerNode = editorDoc.createTextNode(th.id); - th.appendChild(headerNode); - if (!document.all) { - br = editorDoc.createElement("br"); - th.appendChild(br); - } - tr.appendChild(th); - } - else if (j == 0 && (tableheaders == TABLE_HEADERS_ROWS || tableheaders == TABLE_HEADERS_BOTH)) { - th = editorDoc.createElement("th"); - th.scope = "row"; - th.id = ""; - th.abbr = th.id; - var headerNode = editorDoc.createTextNode(th.id); - th.appendChild(headerNode); - if (!document.all) { - br = editorDoc.createElement("br"); - th.appendChild(br); - } - tr.appendChild(th); - } - else { - td = editorDoc.createElement("td"); - if (!document.all) { - br = editorDoc.createElement("br"); - td.appendChild(br); - } - tr.appendChild(td); - } - } - tbody.appendChild(tr); - } - table.appendChild(tbody); - if (document.all) { - selectionRange.parentElement().appendChild(table); - } - else { - selectionRange.insertNode(table); - } - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } -} - -// Adds an unordered list. -function addUnorderedList() { - formatText('insertunorderedlist', null); -} - -// Sets the background color of the selected text. -function backColor(color) { - if (color != null && color != '') { - formatText('backcolor', color); - } -} - -// Toggles the 'bold' attribute of the selected text. -function bold() { - formatText('bold', null); -} - -// Copies the selected text to the clipboard. -function copy() { - if (internalUpdateSelection()) { - if (editorDoc.execCommand('copy', false, null)) { - setStatus(STATUS_EXEC_CMD, 1); - } - } -} - -// Cuts the selected text to the clipboard. -function cut() { - formatText('cut', null); -} - -// Deletes the selected text. -function deleteText() { - formatText('delete', null); -} - -// Finds text. -function findText(text, dir, options) { - if (text == null || text == "") { - return; - } - else { - text = decodeString(text); - } - - if (internalUpdateSelection()) { - if (document.all) { - selectionRange.collapse(dir < 0); - if (selectionRange.findText(text, dir, options)) { - selectionRange.scrollIntoView(); - selectionRange.select(); - selectionRange.collapse(dir < 0); - setStatus(STATUS_EXEC_CMD, 1); - } - } - else { - // find(text, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog) - var caseSensitive = true; - var backwards = false; - var wholeWord = true; - if ((options & 4) == 0) caseSensitive = false; - if (dir == -1) backwards = true; - if ((options & 2) == 0) wholeWord = false; - - if ( wholeWord ) - { - while ( contentWindow.find(text, caseSensitive, backwards, false, wholeWord, false, false) ) - { - var ffSelection = contentWindow.getSelection(); - selectionRange = ffSelection.getRangeAt(0).cloneRange(); - if (selectionRange.startOffset > 0 ) - selectionRange.setStart(selectionRange.startContainer, selectionRange.startOffset -1); - if (selectionRange.endOffset < selectionRange.endContainer.length ) - { - selectionRange.setEnd(selectionRange.endContainer, selectionRange.endOffset+1); - } - var newText = selectionRange.toString(); - var regex = new RegExp("\\b"+text+"\\b"); - - if ( newText.match(regex)) - { - setStatus(STATUS_EXEC_CMD, 1); - break; - } - } - } else if ( contentWindow.find(text, caseSensitive, backwards, false, wholeWord, false, false) ) { - setStatus(STATUS_EXEC_CMD, 1); - } - } - } -} - -// Sets the foreground color of the selected text. -function foreColor(color) { - if (color != null && color != '') { - formatText('forecolor', color); - } -} - -// Formats the selected text using the given HTML heading tag. -function formatBlock(tag) { - if (tag != null && tag != '') { - formatText('formatblock', tag); - } -} - - -var INDENTED_LIST_BAD_HTML_IE = ".*

  • "; -var INDENTED_LIST_BAD_HTML_MOZ = "
  • .*
  • "; - -// Indents the selected text. -function indent() { - formatText('indent', null); - // fix for sub-lists - var html = document.getElementById(editorId).contentWindow.document.body.innerHTML; - if (document.all) { - html = html.replace(INDENTED_LIST_BAD_HTML_IE, ""); - } else { - // firefox sometimes puts the same as IE, sometimes more junk - html = html.replace(INDENTED_LIST_BAD_HTML_IE, ""); - html = html.replace(INDENTED_LIST_BAD_HTML_MOZ, ""); - } - setText(html); -} - -// Toggles the 'italic' attribute of the selected text. -function italic() { - formatText('italic', null); -} - -// Center justifies the selected text. -function justifyCenter() { - formatText('justifycenter', null); -} - -// Fully justifies the selected text. -function justifyFull() { - formatText('justifyfull', null); -} - -// Left justifies the selected text. -function justifyLeft() { - formatText('justifyleft', null); -} - -// Right justifies the selected text. -function justifyRight() { - formatText('justifyright', null); -} - -// Outdents the selected text. -function outdent() { - formatText('outdent', null); -} - -// Pastes text from the clipboard. -function paste(sourceURL) { - if (sourceURL == null) { - sourceURL = ""; - } - else { - sourceURL = decodeString(sourceURL); - } - if (document.all) { - var START_MARKER = "A_-_-_"; - var END_MARKER = ":.:.:"; - // mark img and links with START_MARKER + src/href + END_MARKER in the id, for later recovery - var elements = editorDoc.getElementsByTagName('img'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - var id = element.id; - element.id = START_MARKER + element.src + END_MARKER + id; - } - var elements = editorDoc.getElementsByTagName('a'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - var id = element.id; - element.id = START_MARKER + element.href + END_MARKER + id; - } - - // change the of the document - var oldBaseHREF = editorDoc.getElementsByTagName('base')[0].href; - editorDoc.getElementsByTagName('base')[0].href = sourceURL; - - formatText('paste', null); - - // restore - editorDoc.getElementsByTagName('base')[0].href = oldBaseHREF; - } - else { - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); - } - if (internalUpdateSelection()) { - try { - var regExRes = new RegExp("file\:([^=]+)(/resources/)(.+)", "g"); - var regExRef = new RegExp("(.+)(#.+)"); - var regEx = new RegExp("file\:([^=]+)/([^/]+)", "g"); - var regExID = new RegExp(START_MARKER + "(.*?)" + END_MARKER + "(.*?)"); - var elements = editorDoc.getElementsByTagName('img'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - var id = element.id; - if (id != null && id != '') { - RegExp.lastIndex=0; - var matchArray = id.match(regExID); - if (matchArray != null && matchArray.length > 1) { - element.src = matchArray[1]; - if (matchArray.length > 2 && matchArray[2].length > 0) { - element.id = matchArray[2]; - } - else { - element.removeAttribute('id'); - } - continue; - } - } - var src = element.src; - if (src != null && src != '') { - if (src.indexOf('about:./resources') != -1) { - // fix for IE 7 when pasting from another RTE - // IE7 resolves these as "about:./resources/" - // so remove the "about:." - src = src.replace("about:", ""); - } - if (src.indexOf('about:resources') != -1) { - // fix for IE 7 when pasting from another RTE - // IE7 sometimes resolves these as "about:resources/" - // so remove the "about:" and put in "./" - src = src.replace("about:", "./"); - } - if (src.indexOf('resources') != -1) { - element.src = src.replace(regExRes, "./resources/$3"); - } - else { - element.src = src.replace(regEx, "./resources/$2"); - } - } - } - var elements = editorDoc.getElementsByTagName('a'); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - var id = element.id; - if (id != null && id != '') { - RegExp.lastIndex=0; - var matchArray = id.match(regExID); - if (matchArray != null && matchArray.length > 1) { - element.href = matchArray[1]; - if (matchArray.length > 2 && matchArray[2].length > 0) { - element.id = matchArray[2]; - } - else { - element.removeAttribute('id'); - } - continue; - } - } - var href = element.href; - if (href != null && href != '') { - // fix self-referencing hrefs - if (href.indexOf('#') != -1) { - RegExp.lastIndex=0; - var matchArray = href.match(regExRef); - if (matchArray != null && matchArray.length > 2) { - var hrefFile = matchArray[1]; - var ref = matchArray[2]; - if (hrefFile == sourceURL) { - element.href = ref; - continue; - } - } - } - // fix hrefs already in resources - if (href.indexOf('resources') != -1) { - element.href = href.replace(regExRes, "./resources/$3"); - } - // fix hrefs not in resources - else { - element.href = href.replace(regEx, "./resources/$2"); - } - } - } - } - catch (e) { - } - } -} - -// Redo the previous command. -function redo() { - formatText('redo', null); -} - -// Redo the previous command. -function removeFormat() { - formatText('removeformat', null); -} - - - -function _replaceAllText(findText, replaceText, options) { - // this is IE only - if (document.all) { - var tempRange = document.getElementById(editorId).contentWindow.document.body.createTextRange(); - tempRange.moveStart('character', -10000000000); - do { - tempRange.collapse(); - if (tempRange.findText(findText, 10000000000, options)) { - tempRange.text = replaceText; - tempRange.select(); - } else { - break; - } - } while (true); - } -} - -// Replaces all text. -function replaceAllText(findText, replaceText, options) { - if (readOnly || findText == null || findText == "") { - return; - } - else { - findText = decodeString(findText); - } - if (replaceText == null) { - replaceText = ""; - } - else { - replaceText = decodeString(replaceText); - } - - if (document.all) { - // TODO: Move the insertion point to the start of the HTML - // and perform a search and replace in the forward direction. - _replaceAllText(findText, replaceText, options); - } - else { - // TODO: Emulate the IE implementation. - var html = document.getElementById(editorId).contentWindow.document.body.innerHTML; - var optionStr = "/g"; - if ((options & 4) == 0) { - optionStr += "i"; - } - var regExp = eval("/" + findText + optionStr); - html = html.replace(regExp, replaceText); - setText(html); - } - - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); -} - -// Replaces text. -function replaceText(replaceText, dir, options) { - if (readOnly || !internalUpdateSelection()) { - return; - } - if (replaceText == null) { - replaceText = ""; - } - else { - replaceText = decodeString(replaceText); - } - if (document.all) { - selectionRange.text = replaceText; - if (replaceText != "") { - selectionRange.moveStart("word", -1); - selectionRange.select(); - selectionRange.collapse(dir < 0); - } - } - else { - selectionRange.deleteContents(); - selectionRange.insertNode(editorDoc.createTextNode(replaceText)); - } - setStatus(STATUS_EXEC_CMD, 1); - setStatus(STATUS_MODIFIED, null); -} - -// Selects all text. -function selectAll() { - if (internalUpdateSelection()) { - if (editorDoc.execCommand('selectall', false, null)) { - if ( !document.all ) - { - updateSelection(); - } - setStatus(STATUS_EXEC_CMD, 1); - } - } -} - -// Sets the font name for the selected text. -function setFontName(name) { - if (internalUpdateSelection()) { - if (name != null) { - if (name == '') { - formatText('removeFormat'); - } else { - formatText('fontname', name); - } - } - } -} - -// Sets the font size for the selected text. -function setFontSize(size) { - if (internalUpdateSelection()) { - if (size != null) { - if (size == '') { - formatText('removeFormat'); - } else { - formatText('fontsize', size); - } - } - } -} - -// Sets the font style for the selected text. -function setFontStyle(style) { - if (!readOnly && style != null && style != '' && internalUpdateSelection()) { - try { - if (document.all) { - selectionRange.execCommand("removeformat"); - selectionRange.parentElement().removeAttribute("className"); - } - } - catch (e) { - } - if (style == "") { - formatText('formatblock', '

    '); - if (document.all) { - selectionRange.parentElement().className = "quote"; - } - else { - selection.focusNode.parentNode.className = "quote"; - } - } - else if (style == "") { - formatText('formatblock', '

    '); - if (document.all) { - selectionRange.parentElement().className = "codeSample"; - } - else { - selection.focusNode.parentNode.className = "codeSample"; - } - } - else { - if (!document.all && style == "

    ") { - // A hack to get rid of the "className" attribute in Mozilla/Firefox. - formatText('formatblock', '

    '); - } - formatText('formatblock', style); - } - } -} - -// Sets whether the content can be edited. -function setEditable(editable) { - var doc = document.getElementById(editorId).contentWindow.document; - if (editable != null && editable == 'true') { - if (document.all) { - doc.body.contentEditable = "true"; - } - else { - doc.designMode = "on"; - } - readOnly = false; - } - else { - if (document.all) { - doc.body.contentEditable = "false"; - } - else { - doc.designMode = "off"; - } - readOnly = true; - } - setStatus(STATUS_EXEC_CMD, 1); -} - -// Toggles the 'strike-through' attribute of the selected text. -function strikeThrough() { - formatText('strikethrough', size); -} - -// Toggles the 'subscript' attribute of the selected text. -function subscript() { - formatText('subscript', null); -} - -// Toggles the 'superscript' attribute of the selected text. -function superscript() { - formatText('superscript', null); -} - -// Toggles the 'underline' attribute of the selected text. -function underline() { - formatText('underline', null); -} - -// Converts a link to normal text. -function unlink() { - formatText('unlink', null); -} - -function ObjToString(object) { - var ret = "Object " + object.name + " is [\n"; - for (var prop in object) { - ret += " " + prop + " is " + object[prop] + ";\n"; - } - return ret + "]"; -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.xsl b/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.xsl deleted file mode 100644 index fc35948be50..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/rte/rte.xsl +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichText.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichText.java deleted file mode 100644 index 68d20796988..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichText.java +++ /dev/null @@ -1,355 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.epf.richtext; - -import java.net.URL; -import java.util.Iterator; - -import org.eclipse.epf.richtext.actions.FindReplaceAction; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.HelpListener; -import org.eclipse.swt.events.KeyListener; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Listener; - -/** - * The interface for a rich text control. - *

    - * A rich text control is an editable user interface object that displays rich - * text and images. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public interface IRichText { - - public static final String PROPERTY_NAME = "richText"; //$NON-NLS-1$ - - /** - * Returns this rich text control. - * - * @return this rich text control - */ - public Control getControl(); - - /** - * Sets the layout data. - * - * @param layoutData - * the layout data to set - */ - public void setLayoutData(Object layoutData); - - /** - * Returns the layout data. - * - * @return this control's layout data - */ - public Object getLayoutData(); - - /** - * Sets focus to this control. - */ - public void setFocus(); - - /** - * Tells the control it does not have focus. - */ - public void setBlur(); - - /** - * Checks whether this control has focus. - * - * @return true if this control has the user-interface focus - */ - public boolean hasFocus(); - - /** - * Returns the base path used for resolving text and image links. - * - * @return the base path used for resolving links in this control - */ - public String getBasePath(); - - /** - * Returns the editable state. - * - * @return true if the content is ediatble - */ - public boolean getEditable(); - - /** - * Sets the editable state. - * - * @param editable - * the editable state - */ - public void setEditable(boolean editable); - - /** - * Checks whether the content has been modified. - * - * @return true if the content has been modified - */ - public boolean getModified(); - - /** - * Sets the modified state. - * - * @param modified - * the modified state - */ - public void setModified(boolean modified); - - /** - * Returns the rich text content. - * - * @return the rich text content formatted in a markup language - */ - public String getText(); - - /** - * Sets the rich text content. - * - * @param text - * the rich text content formatted in a markup language - */ - public void setText(String text); - - /** - * Restores the rich text content back to the initial value. - */ - public void restoreText(); - - /** - * Checks whether the editor content has been modified. If it has been - * modified, notify the modify listeners. - */ - public void checkModify(); - - /** - * Returns an object that describes the current selection - * - * @return a RichTextSelection object - */ - public RichTextSelection getSelected(); - - /** - * Returns an application specific property value. - * - * @param key - * the name of the property - * @return the value of the property or null if it has not - * been set - */ - public Object getData(String key); - - /** - * Sets an application specific property name and value. - * - * @param key - * the name of the property - * @param value - * the property value - */ - public void setData(String key, Object value); - - /** - * Executes the given rich text command. The supported command strings are - * defined in RichTextCommand. - * - * @param command a rich text command string - * @return a status code returned by the executed command - */ - public int executeCommand(String command); - - /** - * Executes the given rich text command with a single parameter. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param param a parameter for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String param); - - /** - * Executes the given rich text command with an array of parameters. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param params an array of parameters for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String[] params); - - /** - * Returns the modify listeners attached to this control. - * - * @return an iterator for retrieving the modify listeners - */ - public Iterator getModifyListeners(); - - /** - * Adds a listener to the collection of listeners who will be notified when - * keys are pressed and released within this control. - * - * @param listener - * the listener which should be notified - */ - public void addKeyListener(KeyListener listener); - - /** - * Removes a listener from the collection of listeners who will be notified - * when keys are pressed and released within this control. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeKeyListener(KeyListener listener); - - /** - * Adds a listener to the collection of listeners who will be notified when - * the content of this control is modified. - * - * @param listener - * the listener which should be notified - */ - public void addModifyListener(ModifyListener listener); - - /** - * Removes a listener from the collection of listeners who will be notified - * when the content of this control is modified. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeModifyListener(ModifyListener listener); - - /** - * Adds the listener to the collection of listeners who will be notifed when - * this control is disposed. - * - * @param listener - * the listener which should be notified - */ - public void addDisposeListener(DisposeListener listener); - - /** - * Removes a listener from the collection of listeners who will be notified - * when this control is disposed. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeDisposeListener(DisposeListener listener); - - /** - * Adds a listener to the collection of listeners who will be notified when - * help events are generated for this control. - * - * @param listener - * the listener which should be notified - */ - public void addHelpListener(HelpListener listener); - - /** - * Removes a listener from the collection of listeners who will be notified - * when help events are generated for this control. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeHelpListener(HelpListener listener); - - /** - * Adds the listener to the collection of listeners who will be notifed when - * an event of the given type occurs within this control. - * - * @param eventType - * the type of event to listen for - * @param listener - * the listener which should be notified when the event occurs - */ - public void addListener(int eventType, Listener listener); - - /** - * Removes the listener from the collection of listeners who will be notifed - * when an event of the given type occurs within this econtrol. - * - * @param eventType - * the type of event to listen to - * @param listener - * the listener which should no longer be notified when the event - * occurs - */ - public void removeListener(int eventType, Listener listener); - - /** - * Notifies the modify listeners - * - */ - public void notifyModifyListeners(); - - /** - * Returns the event listeners attached to this control. - * - * @return an iterator for retrieving the event listeners attached to this - * control - */ - public Iterator getListeners(); - - /** - * Returns the base URL of the rich text control whose content was last - * copied to the clipboard. - * - * @return the base URL of a rich text control - */ - public URL getCopyURL(); - - /** - * Sets the base URL of the rich text control whose content was last copied - * to the clipboard. - */ - public void setCopyURL(); - - /** - * Disposes the operating system resources allocated by this control. - */ - public void dispose(); - - /** - * Checks whether this control has been disposed. - * - * @return true if this control is disposed successfully - */ - public boolean isDisposed(); - - /** - * - * @return the control's FindReplaceAction - */ - public FindReplaceAction getFindReplaceAction(); - - /** - * Sets the FindReplaceAction to use - * @param findReplaceAction - */ - public void setFindReplaceAction(FindReplaceAction findReplaceAction); - - /** - * Sets the initialText variable, which stores what is saved on disk - * @param text - */ - public void setInitialText(String text); -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextEditor.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextEditor.java deleted file mode 100644 index 9905e7578f8..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextEditor.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.epf.richtext; - -import org.eclipse.epf.richtext.actions.FindReplaceAction; - -/** - * The interface for a rich text editor. - *

    - * A rich text editor is a composite user interface object that includes a tool - * bar, a tab folder for entering the rich text content, and a tab folder for - * viewing and modifying the rich text content in a markup language. - * - * @author Kelvin Low - * @since 1.0 - */ -public interface IRichTextEditor extends IRichText { - - /** - * Fills the tool bar with rich text action items. - * - * @param toolBar - * a rich text editor tool bar - */ - public void fillToolBar(IRichTextToolBar toolBar); - - /** - * Selects the rich text or the markup language tab. - * - * @param index - * 0 for the rich text tab, 1 for - * the markup language tab - */ - public void setSelection(int index); - - /** - * Sets the FindReplaceAction to use - * @param findReplaceAction - */ - public void setFindReplaceAction(FindReplaceAction findReplaceAction); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextToolBar.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextToolBar.java deleted file mode 100644 index fa8b434f715..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/IRichTextToolBar.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.epf.richtext.actions.RichTextComboAction; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.ToolBarManager; - -/** - * The interface for a rich text editor toolbar. - * - * @author Kelvin Low - * @since 1.0 - */ -public interface IRichTextToolBar { - - - /** - * Adds a button action to the tool bar. - * - * @param action - * the button action to add - */ - public void addAction(IAction action); - - /** - * Adds a combo action to the tool bar. - * - * @param action - * the combo action to add - */ - public void addAction(RichTextComboAction item); - - /** - * Adds a separator to the tool bar. - */ - public void addSeparator(); - - /** - * Updates the toolbar state. - *

    - * Enables/disables actions depending on the currently selected - * RichTextEditor tab (RichText vs. HTML) - * - * @param editable specifies whether to enable non-ReadOnly commands - */ - public void updateToolBar(boolean enabled); - - /** - * - * @return the toolbar manager - */ - public ToolBarManager getToolbarMgr(); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Messages.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Messages.java deleted file mode 100644 index c3b3dd6d417..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Messages.java +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.osgi.util.NLS; - -/** - * The RichText resources. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public final class Messages extends NLS { - - static { - NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$ - } - - private Messages() { - } - - public static String fontNameAction_CSS_Default; - public static String fontNameAction_CSS_Default_Mozilla; - public static String fontNameAction_DefaultFontName; - public static String fontStyle_normal; - public static String fontStyle_sectionHeading; - public static String fontStyle_subsectionHeading; - public static String fontStyle_subSubsectionHeading; - public static String fontStyle_quote; - public static String fontStyle_codeSample; - public static String blockTag_paragraph; - public static String blockTag_heading1; - public static String blockTag_heading2; - public static String blockTag_heading3; - public static String blockTag_heading4; - public static String blockTag_heading5; - public static String blockTag_heading6; - public static String blockTag_address; - public static String blockTag_preformattedText; - public static String fontName_default; - public static String fontName_arial; - public static String fontName_courierNew; - public static String fontName_timesNewRoman; - public static String fontName_verdana; - public static String addHorizontalBarAction_toolTipText; - public static String addImageAction_toolTipText; - public static String addLineAction_toolTipText; - public static String addLinkAction_toolTipText; - public static String addOrderedListAction_toolTipText; - public static String addTableAction_toolTipText; - public static String addUnorderedListAction_toolTipText; - public static String boldAction_toolTipText; - public static String clearContentAction_toolTipText; - public static String copyAction_toolTipText; - public static String cutAction_toolTipText; - public static String findReplaceAction_toolTipText; - public static String indentAction_toolTipText; - public static String italicAction_toolTipText; - public static String justifyCenterAction_toolTipText; - public static String justifyFullAction_toolTipText; - public static String justifyLeftAction_toolTipText; - public static String justifyRightAction_toolTipText; - public static String outdentAction_toolTipText; - public static String pasteAction_toolTipText; - public static String pastePlainTextAction_toolTipText; - public static String subscriptAction_toolTipText; - public static String superscriptAction_toolTipText; - public static String underlineAction_toolTipText; - public static String fontStyleAction_toolTipText; - public static String blockTagAction_toolTipText; - public static String fontNameAction_toolTipText; - public static String fontSizeAction_toolTipText; - public static String cutAction_text; - public static String copyAction_text; - public static String pasteAction_text; - public static String pastePlainTextAction_text; - public static String richTextTab_text; - public static String richTextTab_toolTipText; - public static String htmlTab_text; - public static String htmlTab_toolTipText; - public static String addImageDialog_title; - public static String addLinkDialog_title; - public static String addTableDialog_title; - public static String findReplaceDialog_title; - public static String urlDisplayNameLabel_text; - public static String urlLabel_text; - public static String summaryLabel_text; - public static String captionLabel_text; - public static String rowsLabel_text; - public static String columnsLabel_text; - public static String widthLabel_text; - public static String tableStyleLabel_text; - public static String tableHeaderNone_text; - public static String tableHeaderCols_text; - public static String tableHeaderRows_text; - public static String tableHeaderBoth_text; - public static String browseButton_text; - public static String clearContentDialog_title; - public static String clearContentDialog_text; - public static String findLabel_text; - public static String replaceLabel_text; - public static String optionsGroup_text; - public static String caseSensitiveCheckbox_text; - public static String wholeWordCheckbox_text; - public static String directionGroup_text; - public static String forwardRadioButton_text; - public static String backwardRadioButton_text; - public static String findButton_text; - public static String replaceButton_text; - public static String replaceFindButton_text; - public static String replaceallButton_text; - public static String FindReplace_Status_noMatch_label; - public static String maxCharsPerLineLabel_text; - public static String indentHTMLCheckbox_text; - public static String indentSizeLabel_text; - public static String tidy_clean_text; - public static String tidy_cleaner_text; - public static String tidy_cleanest_text; - public static String tidy_clean_toolTipText; - public static String tidy_cleaner_toolTipText; - public static String tidy_cleanest_toolTipText; - public static String addCodeAction_toolTipText; - public static String addCodeDialog_title; - public static String addCodeDialog_Msg; - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Resources.properties b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Resources.properties deleted file mode 100644 index 1eeeb7bc043..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/Resources.properties +++ /dev/null @@ -1,160 +0,0 @@ -############################################################################### -# Copyright (c) 2009 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -#------------------------------------------------------------------------------- -# Copyright (c) 2000, 2007 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial implementation. -#------------------------------------------------------------------------------- -# NLS_MESSAGEFORMAT_VAR - -################################################################################ -# BEGIN NO TRANSLATION -############################################################################### -# !! DO NOT TRANSLATE THE FOLLOWING LINE !! -fontNameAction_CSS_Default=arial, helvetica, sans-serif -# !! DO NOT TRANSLATE THE FOLLOWING LINE !! -fontNameAction_CSS_Default_Mozilla=arial,helvetica,sans-serif -################################################################################ -# END NO TRANSLATION -################################################################################ - - - -# Font Style Names -fontStyle_normal=Normal -fontStyle_sectionHeading=Section Heading -fontStyle_subsectionHeading=Subsection Heading -fontStyle_subSubsectionHeading=Sub Subsection Heading -fontStyle_quote=Quote -fontStyle_codeSample=Code Sample - -# HTML Block Tags -blockTag_paragraph=Paragraph -blockTag_heading1=Heading 1 -blockTag_heading2=Heading 2 -blockTag_heading3=Heading 3 -blockTag_heading4=Heading 4 -blockTag_heading5=Heading 5 -blockTag_heading6=Heading 6 -blockTag_address=Address -blockTag_preformattedText=Preformatted Text - -# HTML Font Names -fontName_default=Default -fontName_arial=Arial -fontName_courierNew=Courier New -fontName_timesNewRoman=Times New Roman -fontName_verdana=Verdana - -# Rich Text Editor Tool Buttons -addHorizontalBarAction_toolTipText=Add Horizontal Bar -addImageAction_toolTipText=Add Image -addLineAction_toolTipText=Add Line -addLinkAction_toolTipText=Add Link -addOrderedListAction_toolTipText=Add Ordered List -addTableAction_toolTipText=Add Table -addUnorderedListAction_toolTipText=Add Unordered List -boldAction_toolTipText=Bold -clearContentAction_toolTipText=Clear Content -copyAction_toolTipText=Copy -cutAction_toolTipText=Cut -findReplaceAction_toolTipText=Find/Replace -indentAction_toolTipText=Indent -italicAction_toolTipText=Italic -justifyCenterAction_toolTipText=Justify Center -justifyFullAction_toolTipText=Justify Full -justifyLeftAction_toolTipText=Justify Left -justifyRightAction_toolTipText=Justify Right -outdentAction_toolTipText=Outdent -pasteAction_toolTipText=Paste -pastePlainTextAction_toolTipText=Paste as plain text -subscriptAction_toolTipText=Subscript -superscriptAction_toolTipText=Superscript -underlineAction_toolTipText=Underline -tidy_clean_text=Default Clean -tidy_cleaner_text=Clean MS HTML -tidy_cleanest_text=Clean Word 2000 HTML -tidy_clean_toolTipText=Clean with JTidy using default options -tidy_cleaner_toolTipText=Clean HTML of MS HTML -tidy_cleanest_toolTipText=Clean Word 2000 HTML -addCodeAction_toolTipText=Insert custom html (javascript or video) - -# Rich Text Editor Comboboxes -fontStyleAction_toolTipText=Set Font Style -blockTagAction_toolTipText=Set Block Tag -fontNameAction_toolTipText=Set Font -fontNameAction_DefaultFontName=Default font -fontSizeAction_toolTipText=Set Font Size - -# Rich Text Editor Context Menu Items -cutAction_text=&Cut -copyAction_text=C&opy -pasteAction_text=&Paste -pastePlainTextAction_text=Paste &as plain text - -# Rich Text Editor Tabs -richTextTab_text=Rich Text -richTextTab_toolTipText=Edit content in rich text -htmlTab_text=HTML -htmlTab_toolTipText=Edit content in HTML - -# Add Dialogs -addImageDialog_title=Add Image -addLinkDialog_title=Add Link -addTableDialog_title=Add Table -findReplaceDialog_title=Find/Replace -urlLabel_text=URL: -summaryLabel_text=Summary: -captionLabel_text=Caption: -rowsLabel_text=Rows: -columnsLabel_text=Columns: -widthLabel_text=Width: -tableStyleLabel_text=Style: -tableHeaderNone_text=Table with no headers -tableHeaderCols_text=Table with column headers -tableHeaderRows_text=Table with row headers -tableHeaderBoth_text=Table with column and row headers -browseButton_text=Browse... -addCodeDialog_title=Insert Custom Html -addCodeDialog_Msg=Input your html for javascript or video: - -# Clear Editor Content Dialog -clearContentDialog_title=Clear Editor Content Confirmation -clearContentDialog_text=Do you really want to clear the content of this rich text editor? - -# Find/Replace Dialog -findLabel_text=Find: -replaceLabel_text=Replace with: -optionsGroup_text=Options -caseSensitiveCheckbox_text=Case sensitive -wholeWordCheckbox_text=Whole word -directionGroup_text=Direction -forwardRadioButton_text=Forward -backwardRadioButton_text=Backward -findButton_text=Find -replaceButton_text=Replace -replaceFindButton_text=Replace/Find -replaceallButton_text=Replace All -# taken from org.eclipse.ui.workbench.texteditor -FindReplace_Status_noMatch_label=String Not Found - -# Preference Page -maxCharsPerLineLabel_text=Maximum characters per line: -indentHTMLCheckbox_text=Indent HTML tags -indentSizeLabel_text=Indent Size: -urlDisplayNameLabel_text=URL Display Name: - - diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichText.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichText.java deleted file mode 100644 index b0ec1071064..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichText.java +++ /dev/null @@ -1,1671 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import java.io.File; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.epf.common.CommonPlugin; -import org.eclipse.epf.common.IHTMLFormatter; -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.common.utils.ExtensionHelper; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.epf.common.utils.XMLUtil; -import org.eclipse.epf.common.xml.XSLTProcessor; -import org.eclipse.epf.richtext.actions.CopyAction; -import org.eclipse.epf.richtext.actions.CutAction; -import org.eclipse.epf.richtext.actions.FindReplaceAction; -import org.eclipse.epf.richtext.actions.PasteAction; -import org.eclipse.epf.richtext.actions.PastePlainTextAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.browser.Browser; -import org.eclipse.swt.browser.LocationAdapter; -import org.eclipse.swt.browser.LocationEvent; -import org.eclipse.swt.browser.StatusTextEvent; -import org.eclipse.swt.browser.StatusTextListener; -import org.eclipse.swt.events.ControlAdapter; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.HelpListener; -import org.eclipse.swt.events.KeyAdapter; -import org.eclipse.swt.events.KeyEvent; -import org.eclipse.swt.events.KeyListener; -import org.eclipse.swt.events.MenuEvent; -import org.eclipse.swt.events.MenuListener; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.MenuItem; -import org.eclipse.ui.PlatformUI; - -/** - * The default rich text control implementation. - *

    - * The default rich text editor uses XHTML as the underlying markup language for - * the rich text content. It is implemented using a SWT Browser - * control and DHTML (HTML, CSS and JavaScript). - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class RichText implements IRichText { - - // Encoded single quote. All single quotes need to be specially encoded to - // avoid JavaScript error when calling Browse.executeCommand(). - private static final String ENCODED_SINGLE_QUOTE = "%sq%"; //$NON-NLS-1$ - - private static final String ENCODED_NEWLINE = "%EOL%"; //$NON-NLS-1$ - - protected static final String STATUS_PREFIX = "$$$"; //$NON-NLS-1$ - - protected static final int STATUS_PREFIX_LENGTH = STATUS_PREFIX.length(); - - protected static final int STATUS_NOP = 0; - - protected static final int STATUS_INITIALIZED = 1; - - protected static final int STATUS_MODIFIED = 2; - - protected static final int STATUS_GET_TEXT = 3; - - protected static final int STATUS_KEY_DOWN = 4; - - protected static final int STATUS_KEY_UP = 5; - - protected static final int STATUS_SELECT_TEXT = 6; - - protected static final int STATUS_SELECT_CONTROL = 7; - - protected static final int STATUS_SELECT_NONE = 8; - - protected static final int STATUS_EXEC_CMD = 9; - - protected static final int STATUS_REFORMAT_LINKS = 10; - - // The default base path used for resolving links (, , etc.) - private static final String DEFAULT_BASE_PATH = System - .getProperty("user.home") //$NON-NLS-1$ - + System.getProperty("file.separator") + "rte"; //$NON-NLS-1$ //$NON-NLS-2$ - - // If true, log debugging info. - protected boolean debug; - - // The plug-in logger. - protected Logger logger; - - // The underlying SWT Browser used for loading the JavaScript/DHTML editor. - protected Browser editor; - - // The underlying OleControlSite for the SWT Browser (Win32 only). - protected Control editorControl; - - // The base URL of the rich text control whose content was last - // copied to the clipboard. - protected static URL copyURL; - - // The context menu associated with this control. - protected Menu contextMenu; - - // The folder that contains the supporting CSS and JavaScript files - protected String rteFolder; - - // The URL that points to the supporting CSS and JavaScript files. - protected String rteURL; - - // The base path used for resolving links (, , etc.) - protected String basePath; - - // The DHTML initialization flag. - protected boolean initialized; - - // The initial focus. - protected boolean initializedWithFocus; - - // The control's initial text. This is used to cache the HTML source passed - // in via setText()while the DHTML initialization is happening. - protected String initialText; - - // The control's current text. - protected String currentText = ""; //$NON-NLS-1$ - - // The control's editable flag. - protected boolean editable = true; - - // The control's modification flag. - protected boolean modified; - - // The control's text and object selection flag. - protected boolean hasSelection; - - // The control's text selection - protected RichTextSelection richTextSelection = new RichTextSelection(); - - // JavaScript command execution status code. - protected int status = 0; - - // The HTML source formatter. - protected IHTMLFormatter htmlFormatter; - - // The SWT event listeners. - protected Map listeners; - - // The modify listeners. - protected List modifyListeners; - - // The control's edit flag. - protected boolean notifyingModifyListeners = false; - - // The controls's focus flag. - protected boolean hasFocus = false; - - // The controls's processing JavaScript event flag. - protected boolean processingJSEvent = false; - - // The controls's processing MODIFIED JavaScript event flag. - protected boolean checkingModifyEvent = false; - - // The control's find/replace text action - protected FindReplaceAction findReplaceAction; - - // The control's IE flag - protected boolean isIE = false; - - // A event type indicate control has been initialized - public static final int RICH_TEXT_INITIALIZED_WIN32 = 98979695; - public static final int RICH_TEXT_INITIALIZED_LINUX = 98979694; - - /** - * Creates a new instance. - * - * @param parent - * the parent composite - * @param style - * the style for this control - * @param basePath - * the path used for resolving links - */ - public RichText(Composite parent, int style, String basePath) { - debug = RichTextPlugin.getDefault().isDebugging(); - logger = RichTextPlugin.getDefault().getLogger(); - findReplaceAction = new FindReplaceAction(this); - rteFolder = RichTextPlugin.getDefault().getInstallPath() + "rte/"; //$NON-NLS-1$ - rteURL = XMLUtil.escape("file://" + rteFolder); //$NON-NLS-1$ - setBasePath(basePath); - - try { - editor = new Browser(parent, SWT.NONE); - if (debug) { - printDebugMessage("RichText", "basePath=" + basePath); //$NON-NLS-1$ //$NON-NLS-2$ - } - editor.setLayoutData(new GridData(GridData.FILL_BOTH)); - editor.setData(PROPERTY_NAME, this); - init(parent, style); - } catch (Exception e) { - editor = null; - String msg = "Failed to create RichText with basePath=" + basePath; //$NON-NLS-1$ - logger.logError(msg, e); - if (debug) { - System.out.println(msg); - e.printStackTrace(); - } - } - } - - /** - * Creates a new instance. - * - * @param parent - * the parent composite - * @param style - * the style for this control - */ - public RichText(Composite parent, int style) { - this(parent, style, null); - } - - /** - * Sets the base path for resolving links. - */ - protected void setBasePath(String path) { - if (path != null && path.length() > 0) { - if (path.startsWith(FileUtil.UNC_PATH_PREFIX)) { - basePath = FileUtil.UNC_PATH_PREFIX - + FileUtil.appendSeparator(path.substring( - FileUtil.UNC_PATH_PREFIX_LENGTH).replace('\\', - '/'), "/"); //$NON-NLS-1$ - } else { - basePath = FileUtil.appendSeparator(path).replace('\\', '/'); - } - } else { - basePath = FileUtil.appendSeparator(DEFAULT_BASE_PATH).replace( - '\\', '/'); - } - } - - /** - * Initializes this control. - * - * @param parent - * the parent composite - * @param style - * the style for this control - * @throws Exception - * when an error has occurred while initialzing this control - */ - protected void init(Composite parent, int style) throws Exception { - try { - addStatusTextListener(); - - // Bug 244838 : Enforce Browser resizing when its container is resized - editor.addControlListener(new ControlAdapter() { - @Override - public void controlResized(ControlEvent e) { - if (!Platform.getOS().equals("win32")) { //$NON-NLS-1$ - // Workaround Mozilla'a IFRAME height issue. - executeCommand(RichTextCommand.SET_HEIGHT, "" + editor.getBounds().height); //$NON-NLS-1$ - } - } - }); - - if (debug) { - printDebugMessage("init", "added status text listener"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - String editorHTML = generateEditorHTML(); - if (debug) { - printDebugMessage("init", "generated editor HTML"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - editor.setText(editorHTML); - if (debug) { - printDebugMessage("init", "loaded editor HTML"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - contextMenu = new Menu(parent.getShell(), SWT.POP_UP); - editor.setMenu(contextMenu); - fillContextMenu(contextMenu); - if (debug) { - printDebugMessage("init", "added context menu"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - addListeners(); - if (debug) { - printDebugMessage("init", "added listeners"); //$NON-NLS-1$ //$NON-NLS-2$ - } - -// htmlFormatter = new HTMLFormatter(); - htmlFormatter = (IHTMLFormatter) ExtensionHelper.createExtensionForJTidy( - CommonPlugin.getDefault().getId(), "htmlFormatter"); //$NON-NLS-1$ - if (debug) { - printDebugMessage("init", "instantiated HTMLFormatter"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } catch (Exception e) { - editor = null; - dispose(); - throw e; - } - } - - /** - * Returns this rich text control. - * - * @return this rich text control - */ - public Control getControl() { - return editor; - } - - /** - * Sets the layout data. - * - * @param layoutData - * the layout data to set - */ - public void setLayoutData(Object layoutData) { - if (editor != null) { - editor.setLayoutData(layoutData); - } - } - - /** - * Returns the layout data. - * - * @return this control's layout data - */ - public Object getLayoutData() { - if (editor != null) { - return editor.getLayoutData(); - } - return null; - } - - /** - * Sets focus to this control. - */ - public void setFocus() { - if (debug) { - printDebugMessage("setFocus, editable=" + editable); //$NON-NLS-1$ - } - if (editor != null) { - if (initialized) { - if (!editor.isFocusControl()) { - if (!Platform.getOS().equals("win32")) { //$NON-NLS-1$ - // Workaround for Mozilla and Firefox rich text editor focus - // issue. - editor.setFocus(); - } - executeCommand(RichTextCommand.SET_FOCUS); - } - hasFocus = true; - } else { - initializedWithFocus = true; - } - } - } - - /** - * Tells the control it does not have focus. - */ - public void setBlur() { - if (debug) { - printDebugMessage("setBlur, editable=" + editable); //$NON-NLS-1$ - } - if (editor != null) { - if (initialized) { - hasFocus = false; - } else { - initializedWithFocus = false; - } - } - } - - /** - * Checks whether this control has focus. - * - * @return true if this control has the user-interface focus - */ - public boolean hasFocus() { - if (editor != null) { - return hasFocus; - } - return false; - } - - /** - * Returns the base path used for resolving text and image links. - * - * @return the base path used for resolving links in this control - */ - public String getBasePath() { - return basePath; - } - - /** - * Returns the base URL of the rich text control whose content was last - * copied to the clipboard. - * - * @return the base URL of a rich text control - */ - public URL getCopyURL() { - return copyURL; - } - - /** - * Sets the base URL of the rich text control whose content was last copied - * to the clipboard. - */ - public void setCopyURL() { - try { - copyURL = new File(basePath).toURL(); - } catch (Exception e) { - copyURL = null; - } - } - - /** - * Returns the editable state. - * - * @return true if the content is editable - */ - public boolean getEditable() { - return editable; - } - - /** - * Sets the editable state. - * - * @param editable - * the editable state - */ - public void setEditable(boolean editable) { - this.editable = editable; - if (initialized) { - executeCommand(RichTextCommand.SET_EDITABLE, "" + editable); //$NON-NLS-1$ - } - } - - /** - * Checks whether the content has been modified. - * - * @return true if the content has been modified - */ - public boolean getModified() { - return modified; - } - - /** - * Sets the modified state. - * - * @param modified - * the modified state - */ - public void setModified(boolean modified) { - this.modified = modified; - } - - /** - * Returns the rich text content. - * - * @return the rich text content formatted in a markup language - */ - public String getText() { - if (editor != null && initialized) { - try { - executeCommand(RichTextCommand.GET_TEXT); - if (currentText != null && currentText.length() > 0) { - currentText = currentText.replaceAll( - "

     

    ", "
    "); //$NON-NLS-1$ //$NON-NLS-2$ - currentText = tidyText(currentText); - currentText = formatHTML(currentText); - } else { - currentText = ""; //$NON-NLS-1$ - } - if (debug) { - printDebugMessage("getText", "text=", currentText); //$NON-NLS-1$ //$NON-NLS-2$ - } - return currentText; - } catch (Exception e) { - logger.logError(e); - } - } - return ""; //$NON-NLS-1$ - } - - protected String formatHTML(String text) { - String formattedText; - try { - // Call JTidy to format the source to XHTML. - formattedText = htmlFormatter.formatHTML(text); - if (htmlFormatter.getLastErrorStr() != null) { - logger.logError(htmlFormatter.getLastErrorStr()); - } - return formattedText; - } catch (UnsupportedEncodingException e) { - logger.logError(e); - } - return text; - } - - /** - * Sets the rich text content. - * - * @param text - * the rich text content formatted in a markup language - */ - public void setText(String text) { - if (editor != null) { - if (debug) { - printDebugMessage("setText", "text=", text); //$NON-NLS-1$ //$NON-NLS-2$ - } - - String newText = text; - if (newText != null) { - newText = tidyText(newText); - // Call JTidy to format the source to XHTML. - newText = formatHTML(newText); - } else { - newText = ""; //$NON-NLS-1$ - } - - if (initialized) { - modified = !newText.equals(currentText); - } - initialText = newText; - if (initialText.equals("") && !isIE) { //$NON-NLS-1$ - initialText = "
    "; //$NON-NLS-1$ - } - - if (debug) { - printDebugMessage( - "setText", "modified=" + modified + ", newText=", newText); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - if (initialized) { - try { - executeCommand(RichTextCommand.SET_TEXT, workaroundForObjectParamNode(newText)); - executeCommand(RichTextCommand.SET_EDITABLE, "" + editable); //$NON-NLS-1$ - } catch (Exception e) { - logger.logError(e); - } - } - - currentText = newText; - } - } - - /** - * Restores the rich text content back to the initial value. - */ - public void restoreText() { - setText(initialText); - modified = false; - } - - /** - * Returns the currently selected text. - * - * @return the selected text or "" if there is no - * hasSelection - */ - public String getSelectedText() { - // executeCommand(RichTextCommand.GET_SELECTED_TEXT); - return richTextSelection.getText(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.epf.richtext.IRichText#getSelected() - */ - public RichTextSelection getSelected() { - return richTextSelection; - } - - /** - * Returns an application specific property value. - * - * @param key - * the name of the property - * @return the value of the property or null if it has not - * been set - */ - public Object getData(String key) { - if (editor != null) { - return editor.getData(key); - } - return null; - } - - /** - * Sets an application specific property name and value. - * - * @param key - * the name of the property - * @param value - * the property value - */ - public void setData(String key, Object value) { - if (editor != null) { - editor.setData(key, value); - } - } - - /** - * Executes the given JavaScript. - * - * @param script - * the JavaScript to execute - * @return a status code returned by the executed script - */ - protected int execute(final String script) { - status = 0; - if (editor != null && script != null && script.length() > 0) { - try { - if (!isIE && processingJSEvent) { - Display.getCurrent().asyncExec(new Runnable() { - public void run() { - if (!isDisposed()) { - editor.execute(script); - if (!Platform.getOS().equals(Platform.OS_WIN32)) { - if (script.startsWith(RichTextCommand.SET_TEXT)) { - notifyListeners(RichText.RICH_TEXT_INITIALIZED_LINUX, new Event()); - } - } - } - } - }); - } else { - editor.execute(script); - } - if (debug) { - printDebugMessage("execute", script); //$NON-NLS-1$ - } - } catch (Exception e) { - String msg = "Failed to execute " + script; //$NON-NLS-1$ - logger.logError(msg, e); - if (debug) { - printDebugMessage("execute", msg); //$NON-NLS-1$ - e.printStackTrace(); - } - } - } - return status; - } - - /** - * Executes the given rich text command. The supported command strings are - * defined in RichTextCommand. - * - * @param command a rich text command string. - * @return a status code returned by the executed command - */ - public int executeCommand(String command) { - status = 0; - if (command != null && command.equals(RichTextCommand.CLEAR_CONTENT)) { - String oldInitialText = initialText; - setText(""); //$NON-NLS-1$ - initialText = oldInitialText; - status = 1; - modified = true; - notifyModifyListeners(); - } else { - status = execute(command + "();"); //$NON-NLS-1$ - } - return status; - } - - /** - * Executes the given rich text command with a single parameter. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param param a parameter for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String param) { - if (param == null) { - return executeCommand(command); - } - return execute(command + "('" + formatText(param) + "');"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * Executes the given rich text command with an array of parameters. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param params an array of parameters for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String[] params) { - if (params == null || params.length == 0) { - return executeCommand(command); - } - StringBuffer sb = new StringBuffer(); - int paramsLength = params.length; - for (int i = 0; i < paramsLength; i++) { - sb.append('\'').append(formatText(params[i])).append('\''); - if (i < paramsLength - 1) { - sb.append(','); - } - } - String param = sb.toString(); - return execute(command + "(" + param + ");"); //$NON-NLS-1$ //$NON-NLS-2$ - } - - /** - * Disposes the operating system resources allocated by the control. - */ - public void dispose() { - if (contextMenu != null && !contextMenu.isDisposed()) { - contextMenu.dispose(); - contextMenu = null; - } - if (listeners != null) { - listeners.clear(); - listeners = null; - } - if (modifyListeners != null) { - modifyListeners.clear(); - modifyListeners = null; - } - if (htmlFormatter != null) { - htmlFormatter = null; - } - if (this.findReplaceAction != null) { - this.findReplaceAction.dispose(); - this.findReplaceAction = null; - } - } - - /** - * Checks whether this control has been disposed. - * - * @return true if this control is disposed successfully - */ - public boolean isDisposed() { - return editor.isDisposed(); - } - - /** - * Returns the modify listeners attached to this control. - * - * @return an iterator for retrieving the modify listeners - */ - public Iterator getModifyListeners() { - return modifyListeners.iterator(); - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * keys are pressed and released within this control. - * - * @param listener - * the listener which should be notified - */ - public void addKeyListener(KeyListener listener) { - if (editor != null) { - editor.addKeyListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when keys are pressed and released within this control. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeKeyListener(KeyListener listener) { - if (editor != null) { - editor.removeKeyListener(listener); - } - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * the content of this control is modified. - * - * @param listener - * the listener which should be notified - */ - public void addModifyListener(ModifyListener listener) { - if (editor != null && listener != null - && !modifyListeners.contains(listener)) { - modifyListeners.add(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when the content of this control is modified. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeModifyListener(ModifyListener listener) { - if (editor != null && listener != null - && modifyListeners.contains(listener)) { - modifyListeners.remove(listener); - } - } - - /** - * Adds the listener to the collection of listeners who will be notifed when - * this control is disposed. - * - * @param listener - * the listener which should be notified - */ - public void addDisposeListener(DisposeListener listener) { - if (editor != null) { - editor.addDisposeListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when this control is disposed. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeDisposeListener(DisposeListener listener) { - if (editor != null) { - editor.removeDisposeListener(listener); - } - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * help events are generated for this control. - * - * @param listener - * the listener which should be notified - */ - public void addHelpListener(HelpListener listener) { - if (editor != null) { - editor.addHelpListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when help events are generated for this control. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeHelpListener(HelpListener listener) { - if (editor != null) { - editor.removeHelpListener(listener); - } - } - - /** - * Adds the listener to the collection of listeners who will be notifed when - * an event of the given type occurs within this control. - * - * @param eventType - * the type of event to listen for - * @param listener - * the listener which should be notified when the event occurs - */ - public void addListener(int eventType, Listener listener) { - if (editor != null && !listeners.containsKey(listener)) { - if (eventType != SWT.SELECTED) { - if (editorControl == null - || (eventType != SWT.Activate - && eventType != SWT.Deactivate - && eventType != SWT.FocusIn && eventType != SWT.FocusOut)) { - editor.addListener(eventType, listener); - } - } - listeners.put(listener, new RichTextListener(eventType, listener)); - } - } - - /** - * Removes the listener from the collection of listeners who will be notifed - * when an event of the given type occurs within this control. - * - * @param eventType - * the type of event to listen for - * @param listener - * the listener which should no longer be notified when the event - * occurs - */ - public void removeListener(int eventType, Listener listener) { - if (editor != null && listeners.containsKey(listener)) { - if (editorControl == null - || (eventType != SWT.Activate - && eventType != SWT.Deactivate - && eventType != SWT.FocusIn && eventType != SWT.FocusOut)) { - editor.removeListener(eventType, listener); - } - listeners.remove(listener); - } - } - - /** - * Returns the event listeners attached to this control. - * - * @return an iterator for retrieving the event listeners attached to this - * control - */ - public Iterator getListeners() { - return listeners.values().iterator(); - } - - /** - * Adds the listener to monitor events and status sent by the underlying - * DHTML editor. - */ - protected void addStatusTextListener() { - editor.addStatusTextListener(new StatusTextListener() { - public void changed(StatusTextEvent event) { - String eventText = event.text; - int eventTextLength = eventText.length(); - if (eventText.startsWith(STATUS_PREFIX) - && eventTextLength > STATUS_PREFIX_LENGTH) { - try { - processingJSEvent = true; - int endStatusIndex = STATUS_PREFIX_LENGTH + 1; - if (eventText.length() > STATUS_PREFIX_LENGTH + 1 - && Character.isDigit(eventText - .charAt(endStatusIndex))) { - endStatusIndex++; - } - int statusType = Integer.parseInt(eventText.substring( - STATUS_PREFIX_LENGTH, endStatusIndex)); - switch (statusType) { - case STATUS_NOP: - break; - case STATUS_INITIALIZED: - if (!initialized) { - initialized = true; - if (debug) { - printDebugMessage( - "statusTextListener", "STATUS_INITIALIZED"); //$NON-NLS-1$ //$NON-NLS-2$ - } - if (!Platform.getOS().equals("win32")) { //$NON-NLS-1$ - // Workaround Mozilla'a IFRAME - // height issue. - executeCommand(RichTextCommand.SET_HEIGHT, - "" + editor.getBounds().height); //$NON-NLS-1$ - } - executeCommand(RichTextCommand.SET_TEXT, - workaroundForObjectParamNode(currentText)); - if (initializedWithFocus) { - setFocus(); - } - if (!editable) { - executeCommand( - RichTextCommand.SET_EDITABLE, - "" + editable); //$NON-NLS-1$ - } - - if (Platform.getOS().equals(Platform.OS_WIN32)) { - notifyListeners(RichText.RICH_TEXT_INITIALIZED_WIN32, new Event()); - } - } - break; - case STATUS_MODIFIED: - if (debug) { - printDebugMessage( - "statusTextListener", "STATUS_MODIFIED"); //$NON-NLS-1$ //$NON-NLS-2$ - } - checkModify(); - break; - case STATUS_GET_TEXT: - if (eventTextLength >= STATUS_PREFIX_LENGTH + 2) { - currentText = eventText - .substring(STATUS_PREFIX_LENGTH + 2); - - currentText = unWorkaroundForObjectParamNode(currentText); - } else { - currentText = ""; //$NON-NLS-1$ - } - if (debug) { - printDebugMessage( - "statusTextListener", //$NON-NLS-1$ - "STATUS_GET_TEXT, currentText=", currentText); //$NON-NLS-1$ - } - break; - case STATUS_KEY_DOWN: - if (eventTextLength >= STATUS_PREFIX_LENGTH + 2) { - String cmd = eventText - .substring(STATUS_PREFIX_LENGTH + 2); - if (debug) { - printDebugMessage("statusTextListener", //$NON-NLS-1$ - "STATUS_KEY_DOWN, cmd=" + cmd); //$NON-NLS-1$ - } - if (cmd.equals(RichTextCommand.COPY)) { - setCopyURL(); - } else if (cmd.equals(RichTextCommand.CUT)) { - setCopyURL(); - CutAction action = new CutAction( - RichText.this); - action.execute(RichText.this); - } else if (cmd - .equals(RichTextCommand.FIND_TEXT)) { - getFindReplaceAction().execute( - RichText.this); - } else if (cmd.equals(RichTextCommand.PASTE)) { - PasteAction action = new PasteAction( - RichText.this); - action.execute(RichText.this); - } else if (cmd.equals(RichTextCommand.SAVE)) { - PlatformUI.getWorkbench() - .getActiveWorkbenchWindow() - .getActivePage().getActiveEditor() - .doSave(null); - } else if (cmd.equals(RichTextCommand.SAVE_ALL)) { - PlatformUI.getWorkbench() - .getActiveWorkbenchWindow() - .getActivePage().saveAllEditors( - false); - } - } - break; - case STATUS_KEY_UP: - if (debug) { - printDebugMessage("statusTextListener", //$NON-NLS-1$ - "STATUS_KEY_UP, modified=" + modified); //$NON-NLS-1$ - } - checkModify(); - break; - case STATUS_SELECT_TEXT: - if (eventTextLength >= STATUS_PREFIX_LENGTH + 2) { - String[] strings = eventText.substring( - STATUS_PREFIX_LENGTH + 2).split( - "\\$", 5); //$NON-NLS-1$ - try { - richTextSelection.setFontName(strings[0]); - richTextSelection.setFontSize(strings[1]); - richTextSelection.setBlockStyle(strings[2]); - richTextSelection.setFlags(Integer - .parseInt(strings[3])); - richTextSelection.setText(strings[4]); - } catch (NumberFormatException e) { - logger.logError(e); - } - if (debug) { - printDebugMessage( - "selectionStatusListener", //$NON-NLS-1$ - "current selection is=" + richTextSelection); //$NON-NLS-1$ - } - - hasSelection = true; - if (hasFocus()) - notifyListeners(SWT.SELECTED, new Event()); - } else { - richTextSelection.setText(""); //$NON-NLS-1$ - hasSelection = false; - } - if (debug) { - printDebugMessage( - "statusTextListener", //$NON-NLS-1$ - "STATUS_SELECT_TEXT, selectedText=", richTextSelection.getText()); //$NON-NLS-1$ - } - break; - case STATUS_SELECT_CONTROL: - if (debug) { - printDebugMessage("statusTextListener", //$NON-NLS-1$ - "STATUS_SELECT_CONTROL, control selected"); //$NON-NLS-1$ - } - hasSelection = true; - break; - case STATUS_SELECT_NONE: - if (debug) { - printDebugMessage("statusTextListener", //$NON-NLS-1$ - "STATUS_SELECT_NONE, no selection"); //$NON-NLS-1$ - } - hasSelection = false; - break; - case STATUS_EXEC_CMD: - if (eventTextLength >= STATUS_PREFIX_LENGTH + 3) { - try { - status = Integer.parseInt(eventText - .substring( - STATUS_PREFIX_LENGTH + 2, - STATUS_PREFIX_LENGTH + 3)); - } catch (Exception e) { - status = -1; - } - } - if (debug && status != 1) { - printDebugMessage("statusTextListener", //$NON-NLS-1$ - "STATUS_EXEC_CMD, status=" + status); //$NON-NLS-1$ - } - break; - case STATUS_REFORMAT_LINKS: - if (debug) { - printDebugMessage( - "statusTextListener", "STATUS_REFORMAT_LINKS"); //$NON-NLS-1$ //$NON-NLS-2$ - } - if (Platform.getOS().equals("win32")) { //$NON-NLS-1$ - // Workaround the drag and drop issue with DBCS - // characters. - if (modified) { - setText(getText()); - modified = true; - } - } - checkModify(); - break; - } - } catch (Exception e) { - } finally { - processingJSEvent = false; - } - } - } - }); - } - - /** - * Generates the HTML source for the editor. - * - * @return the HTML source for the editor - */ - protected String generateEditorHTML() throws Exception { - String escapedBasePath = basePath; - if (escapedBasePath.startsWith(FileUtil.UNC_PATH_PREFIX)) - escapedBasePath = escapedBasePath.replaceFirst( - "^\\\\\\\\", "\\\\\\\\\\\\\\\\"); //$NON-NLS-1$ //$NON-NLS-2$ - escapedBasePath = XMLUtil - .escape("file://" + escapedBasePath.replaceAll("'", "\\\\'")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - String escapedRteUTL = rteURL.replaceAll("'", "%27"); //$NON-NLS-1$ //$NON-NLS-2$ - - StringBuffer rteXML = new StringBuffer(); - rteXML.append(""); //$NON-NLS-1$ - StringWriter result = new StringWriter(); - XSLTProcessor.transform( - rteFolder + "rte.xsl", rteXML.toString(), result); //$NON-NLS-1$ - return result.toString(); - } - - /** - * Fills the context menu with menu items. - * - * @param contextMenu - * a context menu containing rich text actions - */ - protected void fillContextMenu(Menu contextMenu) { - final MenuItem cutItem = new MenuItem(contextMenu, SWT.PUSH); - cutItem.setText(RichTextResources.cutAction_text); - cutItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - CutAction action = new CutAction(RichText.this); - action.execute(RichText.this); - } - }); - final MenuItem copyItem = new MenuItem(contextMenu, SWT.PUSH); - copyItem.setText(RichTextResources.copyAction_text); - copyItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - CopyAction action = new CopyAction(RichText.this); - action.execute(RichText.this); - } - }); - final MenuItem pasteItem = new MenuItem(contextMenu, SWT.PUSH); - pasteItem.setText(RichTextResources.pasteAction_text); - pasteItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - PasteAction action = new PasteAction(RichText.this); - action.execute(RichText.this); - } - }); - - final MenuItem pastePlainTextItem = new MenuItem(contextMenu, SWT.PUSH); - pastePlainTextItem.setText(RichTextResources.pastePlainTextAction_text); - pastePlainTextItem.setImage(RichTextImages.IMG_PASTE_PLAIN_TEXT); - pastePlainTextItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - PastePlainTextAction action = new PastePlainTextAction( - RichText.this); - action.execute(RichText.this); - } - }); - - contextMenu.addMenuListener(new MenuListener() { - public void menuHidden(MenuEvent e) { - } - - public void menuShown(MenuEvent e) { - getSelectedText(); - cutItem.setEnabled(editable && hasSelection); - copyItem.setEnabled(hasSelection); - pasteItem.setEnabled(editable); - pastePlainTextItem.setEnabled(editable); - } - }); - } - - /** - * Adds listeners to manage the activation and focus events. - */ - protected void addListeners() { - editorControl = getControlSite(editor); - if (editorControl != null) { - if (debug) { - printDebugMessage( - "init", "editorControl=" + editorControl.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$ - } - - // only IE (win32) has the editorControl != null - isIE = true; - - editorControl.addListener(SWT.Activate, new Listener() { - public void handleEvent(Event event) { - if (debug) { - printDebugMessage("activateListener"); //$NON-NLS-1$ - } - setFocus(); - notifyListeners(SWT.Activate, event); - } - }); - - editorControl.addListener(SWT.Deactivate, new Listener() { - public void handleEvent(Event event) { - if (debug) { - printDebugMessage("deactivateListener"); //$NON-NLS-1$ - } - setBlur(); - notifyListeners(SWT.Deactivate, event); - } - }); - - editorControl.addListener(SWT.FocusIn, new Listener() { - public void handleEvent(Event event) { - if (debug) { - printDebugMessage("focusInListener"); //$NON-NLS-1$ - } - executeCommand("updateSelection"); //$NON-NLS-1$ - notifyListeners(SWT.FocusIn, event); - } - }); - - editorControl.addKeyListener(new KeyAdapter() { - public void keyReleased(KeyEvent event) { - int keyCode = event.keyCode; - int stateMask = event.stateMask; - if (debug) { - printDebugMessage( - "keyUpListener", "keyCode=" + keyCode //$NON-NLS-1$ //$NON-NLS-2$ - + ", stateMask=" + stateMask + ", editable=" + editable); //$NON-NLS-1$ //$NON-NLS-2$ - } - - if ( stateMask == SWT.CTRL && event.keyCode == 0x11 ) { //0x11 is for all Control key, such as ctrl-b, ctrl-I, ctrl-c, etc.. - executeCommand("updateSelection"); - } - - if ((stateMask & SWT.CTRL) > 0 - || (stateMask & SWT.ALT) > 0 - || ((stateMask & SWT.SHIFT) > 0 && keyCode == stateMask)) { - return; - } - if (editable) { - switch (event.keyCode) { - case SWT.ARROW_DOWN: - case SWT.ARROW_LEFT: - case SWT.ARROW_RIGHT: - case SWT.ARROW_UP: - case SWT.END: - case SWT.HOME: - case SWT.PAGE_DOWN: - case SWT.PAGE_UP: - case SWT.TAB: - return; - default: - checkModify(); - break; - } - } - } - }); - -// editorControl.addListener(SWT.KeyUp, new Listener() { -// public void handleEvent(Event event) { -// int keyCode = event.keyCode; -// int stateMask = event.stateMask; -// if (debug) { -// printDebugMessage( -// "keyUpListener", "keyCode=" + keyCode //$NON-NLS-1$ //$NON-NLS-2$ -// + ", stateMask=" + stateMask + ", editable=" + editable); //$NON-NLS-1$ //$NON-NLS-2$ -// } -// if ((stateMask & SWT.CTRL) > 0 -// || (stateMask & SWT.ALT) > 0 -// || ((stateMask & SWT.SHIFT) > 0 && keyCode == stateMask)) { -// return; -// } -// if (editable) { -// switch (event.keyCode) { -// case SWT.ARROW_DOWN: -// case SWT.ARROW_LEFT: -// case SWT.ARROW_RIGHT: -// case SWT.ARROW_UP: -// case SWT.END: -// case SWT.HOME: -// case SWT.PAGE_DOWN: -// case SWT.PAGE_UP: -// case SWT.TAB: -// return; -// default: -// checkModify(); -// break; -// } -// } -// } -// }); - - editor.addLocationListener(new LocationAdapter() { - public void changing(LocationEvent event) { - // Deactivate the links in the content page in readonly - // mode. - event.doit = editable; - } - }); - } else { - editor.addListener(SWT.Activate, new Listener() { - public void handleEvent(Event event) { - if (debug) { - printDebugMessage("activateListener"); //$NON-NLS-1$ - } - setFocus(); - } - }); - - editor.addKeyListener(new KeyListener() { - public void keyPressed(KeyEvent e) { - if (e.keyCode == SWT.TAB) { - if ((e.stateMask & SWT.SHIFT) != 0) { - editor.traverse(SWT.TRAVERSE_TAB_PREVIOUS); - } else if ((e.stateMask & SWT.CTRL) == 0 ){ - editor.traverse(SWT.TRAVERSE_TAB_NEXT); - } - return; - } - if (!editable) { - e.doit = false; - } - } - - public void keyReleased(KeyEvent e) { - if ((e.stateMask & SWT.CTRL) > 0 - || (e.stateMask & SWT.ALT) > 0) - return; - if (editable) { - switch (e.keyCode) { - case SWT.ARROW_DOWN: - case SWT.ARROW_LEFT: - case SWT.ARROW_RIGHT: - case SWT.ARROW_UP: - case SWT.END: - case SWT.HOME: - case SWT.PAGE_DOWN: - case SWT.PAGE_UP: - case SWT.SHIFT: - case SWT.TAB: - break; - default: - checkModify(); - break; - } - } - } - }); - } - - editor.addDisposeListener(new DisposeListener() { - public void widgetDisposed(DisposeEvent e) { - if (debug) { - printDebugMessage("disposeListener"); //$NON-NLS-1$ - } - dispose(); - } - }); - - listeners = new Hashtable(); - modifyListeners = new ArrayList(); - } - - /** - * Notifies the rich text event listeners. - * - * @param eventType - * the event type - * @param event - * the SWT event - */ - protected void notifyListeners(int eventType, Event event) { - if (notifyingModifyListeners) { - return; - } - - if (listeners != null) { - event.display = Display.getCurrent(); - event.widget = editor; - - for (Iterator i = listeners.values().iterator(); i - .hasNext();) { - RichTextListener listener = i.next(); - if (listener.getEventType() == eventType) { - if (debug) { - printDebugMessage( - "notifyListeners", "notifying listener, " + listener + ", eventType=" + eventType); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - listener.getListener().handleEvent(event); - if (debug) { - printDebugMessage( - "notifyListeners", "notified listener, " + listener + ", eventType=" + eventType); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - } - } - } - } - - /** - * Notifies the modify listeners that the rich text editor content has - * changed. - */ - public void notifyModifyListeners() { - notifyingModifyListeners = true; - - Event event = new Event(); - event.display = Display.getCurrent(); - event.widget = editor; - - for (Iterator i = modifyListeners.iterator(); i - .hasNext();) { - ModifyListener listener = i.next(); - if (debug) { - printDebugMessage( - "notifyModifyListeners", "notifying listener, " + listener); //$NON-NLS-1$ //$NON-NLS-2$ - } - listener.modifyText(new ModifyEvent(event)); - if (debug) { - printDebugMessage( - "notifyModifyListeners", "notified listener, " + listener); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - notifyingModifyListeners = false; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.epf.richtext.IRichText#checkModify() - */ - public void checkModify() { - try { - if (!checkingModifyEvent) { - checkingModifyEvent = true; - if (modified) { - notifyModifyListeners(); - } else { - if (!isIE && processingJSEvent) { - Display.getCurrent().asyncExec(new Runnable() { - public void run() { - if (!getText().equals(initialText)) { - modified = true; - notifyModifyListeners(); - } - } - }); - } else { - if (!getText().equals(initialText)) { - modified = true; - notifyModifyListeners(); - } - } - } - if (debug) { - printDebugMessage("checkModify", "modified=" + modified); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - } finally { - checkingModifyEvent = false; - } - } - - /** - * This provides an opportunity for a sub class to tidy up the rich text. - * - * @param text - * rich text encoded in HTML format - */ - protected String tidyText(String text) { - return text; - } - - /** - * Formats the text for consumption by the JavaScript/DHTML editor. - * - * @param text - * rich text encoded in HTML format - */ - protected String formatText(String text) { - if (text == null || text.length() == 0) { - return text; - } - StringBuffer result = new StringBuffer(); - int textSize = text.length(); - for (int i = 0; i < textSize; i++) { - char ch = text.charAt(i); - switch (ch) { - case '\r': - break; - case '\t': - result.append(' '); - break; - case '\n': - result.append(ENCODED_NEWLINE); - break; - case '\'': - result.append(ENCODED_SINGLE_QUOTE); - break; - case '\\': - result.append("\\\\"); //$NON-NLS-1$ - break; - default: - result.append(ch); - } - } - return result.toString(); - } - - /** - * Returns the child OleControlSite contained within the - * given Composite. - * - * @param composite - * a Composite object, presumably a - * Browser - * @return an OleControlSite object - */ - protected Control getControlSite(Composite composite) { - if (Platform.getOS().equals("win32")) { //$NON-NLS-1$ - Control[] controls = composite.getChildren(); - for (int i = 0; i < controls.length; i++) { - String controlClass = controls[i].getClass().getName(); - if (controlClass.equals("org.eclipse.swt.browser.WebSite")) { //$NON-NLS-1$ - return controls[i]; - } else if (controls[i] instanceof Composite) { - return getControlSite((Composite) controls[i]); - } - } - } - return null; - } - - /** - * Displays the given debug message to the console. - */ - protected void printDebugMessage(String method, String msg, String text) { - StringBuffer strBuf = new StringBuffer(); - strBuf.append("RichText[").append(editor.handle).append(']') //$NON-NLS-1$ - .append('.').append(method); - if (msg != null && msg.length() > 0) { - strBuf.append(": ").append(msg); //$NON-NLS-1$ - } - if (text != null && text.length() > 0) { - strBuf.append('\n').append(text); - } - System.out.println(strBuf); - } - - /** - * Displays the given debug message to the console. - */ - protected void printDebugMessage(String method, String msg) { - printDebugMessage(method, msg, null); - } - - /** - * Displays the given debug message to the console. - */ - protected void printDebugMessage(String method) { - printDebugMessage(method, null); - } - - public FindReplaceAction getFindReplaceAction() { - return findReplaceAction; - } - - public void setFindReplaceAction(FindReplaceAction findReplaceAction) { - if (findReplaceAction != null) { - if (this.findReplaceAction != null - && this.findReplaceAction != findReplaceAction) { - this.findReplaceAction.dispose(); - } - this.findReplaceAction = findReplaceAction; - this.findReplaceAction.setRichText(this); - } - } - - public void setInitialText(String text) { - setText(text); - initialText = text == null ? "" : text; //$NON-NLS-1$ - modified = false; - } - - public boolean hasError() { - return htmlFormatter.getLastErrorStr() != null; - } - - public static String workaroundForObjectParamNode(String html) { - String result = html.replaceAll(" - * The default rich text editor uses XHTML as the underlying markup language for - * the rich text content. It is implemented using a ViewForm - * control with a tool bar at the top, a tab folder that contains a - * RichText control for entering the rich text content, and a tab - * foler that contains a StyleText control for viewing and - * modifying the XHTML representation of the rich text content. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class RichTextEditor implements IRichTextEditor { - - // The HTML tab name. - protected static final String HTML_TAB_NAME = RichTextResources.htmlTab_text; - - // If true, log debugging info. - protected boolean debug; - - // The plug-in logger. - protected Logger logger; - - // The base path used for resolving links (, , etc.). - protected String basePath; - - // The editor form. - protected ViewForm form; - - // The editor tool bar. - protected IRichTextToolBar toolBar; - - // The editor content. - protected Composite content; - - // The editor tab folder. - protected CTabFolder tabFolder; - - // The rich text tab - protected CTabItem richTextTab; - - // The HTML source tab - protected CTabItem htmlTab; - - // The embedded rich text control. - protected IRichText richText; - - // The underlying HTML text editor. - protected TextViewer sourceViewer; - - protected IDocument currentDoc; - - // Drop support - protected DropTarget sourceEditDropTarget; - - // HTML editor's context menu - protected Menu contextMenu; - - // Has the HTML source been modified? - protected boolean sourceModified = false; - - // The editor's editable flag. - protected boolean editable = true; - - private OperationHistoryActionHandler undoAction; - - private OperationHistoryActionHandler redoAction; - - private IEditorSite editorSite; - - /** The actions registered with the editor. */ - private Map fActions= new HashMap(10); - - /** The verify key listener for activation code triggering. */ - private ActivationCodeTrigger fActivationCodeTrigger= new ActivationCodeTrigger(); - - /** The editor's action activation codes. */ - private List fActivationCodes= new ArrayList(2); - - final IUndoManager undoManager= new TextViewerUndoManager(10); - - /** - * The key binding scopes of this editor. - * @since 2.1 - */ - private String[] fKeyBindingScopes; - - - protected IDocumentListener sourceEditDocumentListener= new IDocumentListener() { - public void documentAboutToBeChanged(DocumentEvent event) { - } - public void documentChanged(DocumentEvent event) { - sourceModified = true; - if (richText != null && richText instanceof RichText) { - richText.notifyModifyListeners(); - } - } - }; - - - // The deactivate listener for the sourceEdit control. - protected Listener sourceEditDeactivateListener = new Listener() { - public void handleEvent(Event event) { - if (sourceModified) { - updateRichText(sourceViewer.getTextWidget().getText()); - setModified(true); - sourceModified = false; - } - } - }; - - // The key listener for the sourceEdit control. - protected KeyListener sourceEditKeyListener = new KeyListener() { - public void keyPressed(KeyEvent e) { - Object adapter = PlatformUI.getWorkbench().getAdapter( - IBindingService.class); - if (adapter != null && adapter instanceof IBindingService) { - int accel = SWTKeySupport - .convertEventToUnmodifiedAccelerator(e); - KeyStroke stroke = SWTKeySupport - .convertAcceleratorToKeyStroke(accel); - KeySequence seq = KeySequence.getInstance(stroke); - Binding bind = ((IBindingService) adapter).getPerfectMatch(seq); - if (bind != null) { - ParameterizedCommand command = bind - .getParameterizedCommand(); - if (command != null) { - String cmdId = command.getId(); - if (cmdId != null - && cmdId - .equals("org.eclipse.ui.edit.findReplace")) { //$NON-NLS-1$ - richText.getFindReplaceAction().execute(RichTextEditor.this); - } - } - } - } - } - - public void keyReleased(KeyEvent e) { - } - }; - - /** - * Creates a new instance. - * - * @param parent - * the parent composite - * @param style - * the editor style - */ - public RichTextEditor(Composite parent, int style, IEditorSite editorSite) { - this(parent, style, editorSite, null); - } - - /** - * Creates a new instance. - * - * @param parent - * the parent composite - * @param style - * the editor style - * @param basePath - * the base path used for resolving links - */ - public RichTextEditor(Composite parent, int style, IEditorSite editorSite, String basePath) { - this.basePath = basePath; - this.editorSite = editorSite; - debug = RichTextPlugin.getDefault().isDebugging(); - logger = RichTextPlugin.getDefault().getLogger(); - init(parent, style); - } - - /** - * Initializes this editor. - * - * @param parent - * the parent composite - * @param style - * the editor style - */ - protected void init(Composite parent, int style) { - try { - form = new ViewForm(parent, style); - form.marginHeight = 0; - form.marginWidth = 0; - - toolBar = new RichTextToolBar(form, SWT.FLAT, this); - - content = new Composite(form, SWT.FLAT); - GridLayout layout = new GridLayout(); - layout.marginHeight = 0; - layout.marginWidth = 0; - content.setLayout(layout); - - tabFolder = createEditorTabFolder(content, style); - - form.setTopCenter(((RichTextToolBar)toolBar).getToolbarMgr().getControl()); - form.setTopLeft(((RichTextToolBar)toolBar).getToolbarMgrCombo().getControl()); - form.setContent(content); - } catch (Exception e) { - logger.logError(e); - } - } - - /** - * Returns the form control. - * - * @return the form control - */ - public Control getControl() { - return form; - } - - /** - * Returns the rich text control embedded within this editor. - */ - public IRichText getRichTextControl() { - return richText; - } - - /** - * Sets the layout data. - * - * @param layoutData - * the layout data to set - */ - public void setLayoutData(Object layoutData) { - if (form != null) { - form.setLayoutData(layoutData); - } - } - - /** - * Returns the layout data. - * - * @return the editor's layout data - */ - public Object getLayoutData() { - if (form != null) { - return form.getLayoutData(); - } - return null; - } - - /** - * Sets focus to this editor. - */ - public void setFocus() { - if (richText != null) { - richText.setFocus(); - } - setSelection(0); - if (toolBar != null && tabFolder != null) { - toolBar.updateToolBar(editable); - } - - } - - /** - * Tells the control it does not have focus. - */ - public void setBlur() { - if (richText != null) { - richText.setBlur(); - } - } - - /** - * Checks whether this editor has focus. - * - * @return true if this editor has the user-interface focus - */ - public boolean hasFocus() { - if (richText != null) { - return richText.hasFocus(); - } - return false; - } - - /** - * Selects the Rich Text or HTML tab. - * - * @param index - * 0 for the Rich Text tab, 1 for - * the HTML tab. - */ - public void setSelection(int index) { - if (tabFolder != null) { - tabFolder.setSelection(index); - } - } - - /** - * Returns the base path used for resolving text and image links. - * - * @return the base path used for resolving links specified with , - * , etc. - */ - public String getBasePath() { - return basePath; - } - - /** - * Returns the base URL of the rich text control whose content was last - * copied to the clipboard. - * - * @return the base URL of a rich text control - */ - public URL getCopyURL() { - if (richText != null) { - return richText.getCopyURL(); - } - return null; - } - - /** - * Sets the base URL of the rich text control whose content was last copied - * to the clipboard. - */ - public void setCopyURL() { - if (richText != null) { - richText.setCopyURL(); - } - } - - /** - * Returns the editable state. - * - * @return true if the content can be edited - */ - public boolean getEditable() { - return editable; - } - - /** - * Sets the editable state. - * - * @param editable - * the editable state - */ - public void setEditable(boolean editable) { - this.editable = editable; - if (toolBar != null && tabFolder != null) { - toolBar.updateToolBar(editable); - } - if (richText != null) { - richText.setEditable(editable); - } - if (sourceViewer != null) { - sourceViewer.setEditable(editable); - } - } - - /** - * Checks whether the content has been modified. - * - * @return true if the content has been modified - */ - public boolean getModified() { - if (richText != null) { - return richText.getModified(); - } - return false; - } - - /** - * Sets the modified state. - * - * @param modified - * the modified state - */ - public void setModified(boolean modified) { - if (richText != null) { - richText.setModified(modified); - } - } - - /** - * Returns the rich text content. - * - * @return the rich text content formatted in XHTML - */ - public String getText() { - if (sourceModified) { - setText(getSourceEdit().getText()); - setModified(true); - sourceModified = false; - } - if (richText != null) { - return richText.getText(); - } - return ""; //$NON-NLS-1$ - } - - /** - * Sets the rich text content. - * - * @param text - * the rich text content in XHTML format - */ - public void setText(String text) { - if (richText != null) { - richText.setText(text); - } - sourceModified = false; - if (tabFolder != null) { - if (toolBar != null) { - toolBar.updateToolBar(editable); - } - if (getSourceEdit() != null) { - removeModifyListeners(); - currentDoc.set(text); - addModifyListeners(); - } - } - } - - protected void addModifyListeners() { - if (currentDoc != null) { - currentDoc.addDocumentListener(sourceEditDocumentListener); - } - } - - protected void removeModifyListeners() { - if (currentDoc != null) { - currentDoc.removeDocumentListener(sourceEditDocumentListener); - } - } - - /* - * (non-Javadoc) - * @see org.eclipse.epf.richtext.IRichText#checkModify() - */ - public void checkModify() { - richText.checkModify(); - if (sourceModified) { - notifyModifyListeners(); - } - if (debug) { - printDebugMessage("checkModify", "modified=" + sourceModified); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - - /** - * Restores the rich text content back to the initial value. - */ - public void restoreText() { - if (richText != null) { - richText.restoreText(); - } - } - - /* - * (non-Javadoc) - * @see org.eclipse.epf.richtext.IRichText#getSelected() - */ - public RichTextSelection getSelected() { - if (tabFolder.getSelection() == htmlTab) { - String HTMLsource = getSourceEdit().getText(); - Point sel = sourceViewer.getSelectedRange(); - int selStartIndex = sel.x; - int selEndIndex = sel.x + sel.y - 1; - richText.getSelected().clear(); - richText.getSelected().setText(HTMLsource.substring(selStartIndex, selEndIndex + 1)); - } - return richText.getSelected(); - } - - /** - * Returns an application specific property value. - * - * @param key - * the name of the property - * @return the value of the property or null if it has not - * been set - */ - public Object getData(String key) { - if (richText != null) { - return richText.getData(key); - } - return null; - } - - /** - * Sets an application specific property name and value. - * - * @param key - * the name of the property - * @param value - * the new value for the property - */ - public void setData(String key, Object value) { - if (richText != null) { - richText.setData(key, value); - } - } - - /** - * Executes the given rich text command. The supported command strings are - * defined in RichTextCommand. - * - * @param command a rich text command string - * @return a status code returned by the executed command - */ - public int executeCommand(String command) { - if (richText != null) { - return richText.executeCommand(command); - } - return 0; - } - - /** - * Executes the given rich text command with a single parameter. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param param a parameter for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String param) { - if (richText != null) { - return richText.executeCommand(command, param); - } - return 0; - } - - /** - * Executes the given rich text command with an array of parameters. The - * supported command strings are defined in RichTextCommand. - * - * @param command a rich text command string - * @param params an array of parameters for the command or null - * @return a status code returned by the executed command - */ - public int executeCommand(String command, String[] params) { - if (richText != null) { - return richText.executeCommand(command, params); - } - return 0; - } - - /** - * Disposes the operating system resources allocated by this editor. - */ - public void dispose() { - if (contextMenu != null && !contextMenu.isDisposed()) { - contextMenu.dispose(); - contextMenu = null; - } - if (sourceEditDropTarget != null) { - sourceEditDropTarget.dispose(); - sourceEditDropTarget = null; - } - if (fActivationCodeTrigger != null) { - fActivationCodeTrigger.uninstall(); - fActivationCodeTrigger= null; - } - removeModifyListeners(); - if (getSourceEdit() != null) { - getSourceEdit().removeListener(SWT.Deactivate, - sourceEditDeactivateListener); - getSourceEdit().removeKeyListener(sourceEditKeyListener); - sourceEditDeactivateListener = null; - sourceEditKeyListener = null; - } - - if (sourceViewer != null) { - sourceViewer= null; - } - - if (fActions != null) { - fActions.clear(); - fActions= null; - } - if (fActivationCodes != null) { - fActivationCodes.clear(); - fActivationCodes= null; - } - - if (richText != null) { - richText.dispose(); - richText = null; - } - } - - /** - * Checks whether this control has been disposed. - * - * @return true if this control is disposed successfully - */ - public boolean isDisposed() { - if (richText != null) { - return richText.isDisposed(); - } - return true; - } - - /** - * Returns the modify listeners attached to this editor. - * - * @return an iterator for retrieving the modify listeners - */ - public Iterator getModifyListeners() { - if (richText != null) { - richText.getModifyListeners(); - } - return null; - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * keys are pressed and released within this editor. - * - * @param listener - * the listener which should be notified - */ - public void addKeyListener(KeyListener listener) { - if (richText != null) { - richText.addKeyListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when keys are pressed and released within this editor. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeKeyListener(KeyListener listener) { - if (richText != null) { - richText.removeKeyListener(listener); - } - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * the content of this editor is modified. - * - * @param listener - * the listener which should be notified - */ - public void addModifyListener(ModifyListener listener) { - if (richText != null) { - richText.addModifyListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when the content of this editor is modified. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeModifyListener(ModifyListener listener) { - if (richText != null) { - richText.removeModifyListener(listener); - } - } - - /** - * Adds the listener to the collection of listeners who will be notifed when - * this editor is disposed. - * - * @param listener - * the listener which should be notified - */ - public void addDisposeListener(DisposeListener listener) { - if (richText != null) { - richText.addDisposeListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when this editor is disposed. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeDisposeListener(DisposeListener listener) { - if (richText != null) { - richText.removeDisposeListener(listener); - } - } - - /** - * Adds a listener to the collection of listeners who will be notified when - * help events are generated for this editor. - * - * @param listener - * the listener which should be notified - */ - public void addHelpListener(HelpListener listener) { - if (richText != null) { - richText.addHelpListener(listener); - } - } - - /** - * Removes a listener from the collection of listeners who will be notified - * when help events are generated for this editor. - * - * @param listener - * the listener which should no longer be notified - */ - public void removeHelpListener(HelpListener listener) { - if (richText != null) { - richText.removeHelpListener(listener); - } - } - - /** - * Adds the listener to the collection of listeners who will be notifed when - * an event of the given type occurs within this editor. - * - * @param eventType - * the type of event to listen for - * @param listener - * the listener which should be notified when the event occurs - */ - public void addListener(int eventType, Listener listener) { - if (richText != null) { - richText.addListener(eventType, listener); - } - } - - /** - * Removes the listener from the collection of listeners who will be notifed - * when an event of the given type occurs within this editor. - * - * @param eventType - * the type of event to listen for - * @param listener - * the listener which should no longer be notified when the event - * occurs - */ - public void removeListener(int eventType, Listener listener) { - if (richText != null) { - richText.removeListener(eventType, listener); - } - } - - /** - * Returns the event listeners attached to this editor. - * - * @return an iterator for retrieving the event listeners attached to this - * editor - */ - public Iterator getListeners() { - if (richText != null) { - return richText.getListeners(); - } - return null; - } - - /** - * Notifies the modify listeners that the rich text editor content has - * changed. - */ - public void notifyModifyListeners() { - if (richText != null) { - Event event = new Event(); - event.display = Display.getCurrent(); - event.widget = richText.getControl(); - - for (Iterator i = getModifyListeners(); i != null && i.hasNext();) { - ModifyListener listener = i.next(); - listener.modifyText(new ModifyEvent(event)); - } - } - } - - /** - * Fills the tool bar with action items. - * - * @param toolBar - * a tool bar contain rich text actions - */ - public void fillToolBar(IRichTextToolBar toolBar) { - } - - /** - * Creates the underlying rich text control. - * - * @param parent - * the parent composite - * @param style - * the style for the control - * @param basePath - * the path used for resolving links - */ - protected IRichText createRichTextControl(Composite parent, int style, - String basePath) { - return new RichText(parent, style, basePath); - } - - /** - * Creates the editor tab folder. - * - * @param parent - * the parent control - * @param style - * the style for the control - * @return a new editor toolbar - */ - protected CTabFolder createEditorTabFolder(Composite parent, int style) { - CTabFolder folder = new CTabFolder(parent, SWT.FLAT | SWT.BOTTOM); - folder.setLayout(new GridLayout(1, true)); - folder.setLayoutData(new GridData(GridData.FILL_BOTH)); - - Composite richTextComposite = new Composite(folder, SWT.FLAT); - GridLayout richTextCompositeLayout = new GridLayout(1, false); - richTextCompositeLayout.marginHeight = 0; - richTextCompositeLayout.marginWidth = 0; - richTextComposite.setLayout(richTextCompositeLayout); - richTextComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); - - richText = createRichTextControl(richTextComposite, style, basePath); - richText.setData(PROPERTY_NAME, this); - richText.getFindReplaceAction().setRichText(this); - - richTextTab = new CTabItem(folder, SWT.FLAT); - richTextTab.setText(RichTextResources.richTextTab_text); - richTextTab.setToolTipText(RichTextResources.richTextTab_toolTipText); - richTextTab.setControl(richTextComposite); - - Composite htmlComposite = new Composite(folder, SWT.FLAT); - htmlComposite.setLayout(new FillLayout()); - - sourceViewer = new TextViewer(htmlComposite, SWT.FLAT | SWT.MULTI - | SWT.WRAP | SWT.V_SCROLL); - sourceViewer.setUndoManager(undoManager); - setDocument(null); - addModifyListeners(); - getSourceEdit().addListener(SWT.Deactivate, sourceEditDeactivateListener); - getSourceEdit().addKeyListener(sourceEditKeyListener); - contextMenu = new Menu(parent.getShell(), SWT.POP_UP); - getSourceEdit().setMenu(contextMenu); - // FIXME! This opens up a can of worms, especially with DBCS characters. - // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=179432. - //addDropSupportToStyledText(); - fillContextMenu(contextMenu); - - - htmlTab = new CTabItem(folder, SWT.NONE); - htmlTab.setText(HTML_TAB_NAME); - htmlTab.setToolTipText(RichTextResources.htmlTab_toolTipText); - htmlTab.setControl(htmlComposite); - - folder.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - CTabItem item = (CTabItem) event.item; - if (item.getText().equals(HTML_TAB_NAME)) { - removeModifyListeners(); - currentDoc.set(getText()); - sourceModified = false; - addModifyListeners(); - if (toolBar != null) { - toolBar.updateToolBar(editable); - } - } else { - updateRichText(getSourceEdit().getText()); - setModified(true); - if (toolBar != null) { - toolBar.updateToolBar(editable); - } - } - } - }); - fillToolBar(toolBar); - - initializeActivationCodeTrigger(); - createActions(); - - folder.setSelection(0); - - return folder; - } - - - private void setDocument(IDocument doc) { - if (doc == null) { - doc = new Document(); - } - // clean up old doc - undoManager.disconnect(); - IDocument oldDoc = sourceViewer.getDocument(); - if (oldDoc != null) { - oldDoc.removeDocumentListener(sourceEditDocumentListener); - } - - // hook up new doc - currentDoc = doc; - sourceViewer.setDocument(currentDoc); - currentDoc.addDocumentListener(sourceEditDocumentListener); - undoManager.connect(sourceViewer); - if (undoAction != null) { - undoAction.setContext(getUndoContext()); - } - if (redoAction != null) { - redoAction.setContext(getUndoContext()); - } - } - - /** - * Returns the HTML source edit control. - * - * @return a StyleText object. - */ - public StyledText getSourceEdit() { - if (sourceViewer != null) { - return sourceViewer.getTextWidget(); - } - return null; - } - - /** - * Inserts text at the selection (overwriting the selection). - */ - public void addHTML(String text) { - if (text == null || text.length() == 0) - return; - if (tabFolder.getSelection() == richTextTab) { - //To avoid encoding of javascript - text = text.replaceAll("&", "&"); //$NON-NLS-1$//$NON-NLS-2$ - executeCommand(RichTextCommand.ADD_HTML, text); - } else if (tabFolder.getSelection() == htmlTab) { - String oldHTML = getSourceEdit().getText(); - Point sel = sourceViewer.getSelectedRange(); - int selStartIndex = sel.x; - int selEndIndex = sel.x + sel.y - 1; - String newHTML = oldHTML.substring(0, selStartIndex) + text - + oldHTML.substring(selEndIndex + 1); - removeModifyListeners(); - currentDoc.set(newHTML); - addModifyListeners(); - updateRichText(newHTML); - } - } - - - /** - * Inserts an image at the selection (overwriting the selection). - */ - public void addImage(String imageURL, String height, String width, String altTag) { - if (tabFolder.getSelection() == richTextTab) { - executeCommand( - RichTextCommand.ADD_IMAGE, - new String[] { - imageURL, - height, width, altTag }); - } else if (tabFolder.getSelection() == htmlTab) { - StringBuffer imageLink = new StringBuffer(); - // order of these attributes is the same as JTidy'ed HTML - imageLink.append(" 0) { - imageLink.append(" height=\"" + height + "\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - if (altTag.length() > 0) { - imageLink.append(" alt=\"" + altTag + "\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - imageLink.append(" src=\"" + imageURL + "\""); //$NON-NLS-1$ //$NON-NLS-2$ - if (width.length() > 0) { - imageLink.append(" width=\"" + width + "\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - imageLink.append(" />"); //$NON-NLS-1$ - String oldHTML = getSourceEdit().getText(); - Point sel = sourceViewer.getSelectedRange(); - int selStartIndex = sel.x; - int selEndIndex = sel.x + sel.y - 1; - String newHTML = oldHTML.substring(0, selStartIndex) + imageLink.toString() - + oldHTML.substring(selEndIndex + 1); - removeModifyListeners(); - currentDoc.set(newHTML); - addModifyListeners(); - updateRichText(newHTML); - } - } - - /** - * Checks whether the HTML tab is selected. - * - * @return true if the HTML tab is selected. - */ - public boolean isHTMLTabSelected() { - return (tabFolder.getSelection() == htmlTab); - } - - /** - * Fills the context menu with menu items. - * - * @param contextMenu - * a context menu containing rich text actions - */ - protected void fillContextMenu(Menu contextMenu) { - final MenuItem cutItem = new MenuItem(contextMenu, SWT.PUSH); - cutItem.setText(RichTextResources.cutAction_text); - cutItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - CutAction action = new CutAction(RichTextEditor.this); - action.execute(RichTextEditor.this); - } - }); - final MenuItem copyItem = new MenuItem(contextMenu, SWT.PUSH); - copyItem.setText(RichTextResources.copyAction_text); - copyItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - CopyAction action = new CopyAction(RichTextEditor.this); - action.execute(RichTextEditor.this); - } - }); - final MenuItem pasteItem = new MenuItem(contextMenu, SWT.PUSH); - pasteItem.setText(RichTextResources.pasteAction_text); - pasteItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - PasteAction action = new PasteAction(RichTextEditor.this); - action.execute(RichTextEditor.this); - } - }); - - final MenuItem pastePlainTextItem = new MenuItem(contextMenu, SWT.PUSH); - pastePlainTextItem.setText(RichTextResources.pastePlainTextAction_text); - pastePlainTextItem.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - PastePlainTextAction action = new PastePlainTextAction(RichTextEditor.this); - action.execute(RichTextEditor.this); - } - }); - - contextMenu.addMenuListener(new MenuListener() { - public void menuHidden(MenuEvent e) { - } - - public void menuShown(MenuEvent e) { - String selectedText = getSelected().getText(); - boolean selection = selectedText.length() > 0; - cutItem.setEnabled(editable && selection); - copyItem.setEnabled(selection); - pasteItem.setEnabled(editable); - pastePlainTextItem.setEnabled(editable); - } - }); - } - - /** - * Updates the content of the rich text control without updating the HTML - * source editor. - *

    - * This method should be called by the HTML source editor to sync up its - * content with the rich text control. - * - * @param text - * the rich text content in XHTML format - */ - private void updateRichText(String text) { - if (richText != null) { - richText.setText(text); - richText.checkModify(); - } - sourceModified = false; - if (tabFolder != null) { - if (toolBar != null) { - toolBar.updateToolBar(editable); - } - } - } - - private void addDropSupportToStyledText() { - // this function based heavily on the example at: - // http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html - - // Allow data to be copied to the drop target - int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT; - sourceEditDropTarget = new DropTarget(getSourceEdit(), operations); - - // Receive data in Text or HTML format - final TextTransfer textTransfer = TextTransfer.getInstance(); - final HTMLTransfer htmlTransfer = HTMLTransfer.getInstance(); - Transfer[] types = new Transfer[] {htmlTransfer, textTransfer}; - sourceEditDropTarget.setTransfer(types); - - sourceEditDropTarget.addDropListener(new DropTargetListener() { - public void dragEnter(DropTargetEvent event) { - if (event.detail == DND.DROP_DEFAULT) { - if ((event.operations & DND.DROP_COPY) != 0) { - event.detail = DND.DROP_COPY; - } else { - event.detail = DND.DROP_NONE; - } - } - if (!getEditable()) { - event.detail = DND.DROP_NONE; - } - // will accept text but prefer to have HTML dropped - for (int i = 0; i < event.dataTypes.length; i++) { - if (htmlTransfer.isSupportedType(event.dataTypes[i])){ - event.currentDataType = event.dataTypes[i]; - break; - } - } - } - public void dragOver(DropTargetEvent event) { - event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_INSERT_AFTER | DND.FEEDBACK_SCROLL; - } - public void dragOperationChanged(DropTargetEvent event) { - if (event.detail == DND.DROP_DEFAULT) { - if ((event.operations & DND.DROP_COPY) != 0) { - event.detail = DND.DROP_COPY; - } else { - event.detail = DND.DROP_NONE; - } - } - } - public void dragLeave(DropTargetEvent event) { - } - public void dropAccept(DropTargetEvent event) { - } - public void drop(DropTargetEvent event) { - if (textTransfer.isSupportedType(event.currentDataType) || - htmlTransfer.isSupportedType(event.currentDataType)) { - String text = (String)event.data; - addHTML(text); - } - } - }); - } - - /** - * Displays the given debug message to the console. - */ - private void printDebugMessage(String method, String msg, String text) { - StringBuffer strBuf = new StringBuffer(); - strBuf.append("RichTextEditor[").append(richText.getControl().handle).append(']') //$NON-NLS-1$ - .append('.').append(method); - if (msg != null && msg.length() > 0) { - strBuf.append(": ").append(msg); //$NON-NLS-1$ - } - if (text != null && text.length() > 0) { - strBuf.append('\n').append(text); - } - System.out.println(strBuf); - } - - /** - * Displays the given debug message to the console. - */ - private void printDebugMessage(String method, String msg) { - printDebugMessage(method, msg, null); - } - - public FindReplaceAction getFindReplaceAction() { - return richText.getFindReplaceAction(); - } - - public void setFindReplaceAction(FindReplaceAction findReplaceAction) { - if (richText != null) { - richText.setFindReplaceAction(findReplaceAction); - richText.getFindReplaceAction().setRichText(this); - - } - } - - public void setInitialText(String text) { - if (richText != null) { - richText.setInitialText(text); - } - if (getSourceEdit() != null) { - removeModifyListeners(); - setDocument(new Document(text)); - addModifyListeners(); - } - - } - - - /** - * from org.eclipse.ui.texteditor.AbstractTextEditor#getUndoContext() - * Returns this editor's viewer's undo manager undo context. - * - * @return the undo context or null if not available - * @since 3.1 - */ - private IUndoContext getUndoContext() { - if (sourceViewer instanceof ITextViewerExtension6) { - IUndoManager undoManager= ((ITextViewerExtension6)sourceViewer).getUndoManager(); - if (undoManager instanceof IUndoManagerExtension) - return ((IUndoManagerExtension)undoManager).getUndoContext(); - } - return null; - } - - protected void createActions() { - createUndoRedoActions(); - // select all - Action selectAllAction = new Action() { - @Override - public void run() { - getSourceEdit().selectAll(); - } - }; - selectAllAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.SELECT_ALL); - registerAction(ActionFactory.SELECT_ALL.getId(), selectAllAction); - } - - /* - * from org.eclipse.ui.texteditor.AbstractTextEditor#createUndoRedoActions() - */ - protected void createUndoRedoActions() { - IUndoContext undoContext= getUndoContext(); - if (undoContext != null) { - // Use actions provided by global undo/redo - - // Create the undo action - undoAction= new UndoActionHandler(getEditorSite(), undoContext); - PlatformUI.getWorkbench().getHelpSystem().setHelp(undoAction, IAbstractTextEditorHelpContextIds.UNDO_ACTION); - undoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.UNDO); - registerAction(ITextEditorActionConstants.UNDO, undoAction); - - // Create the redo action. - redoAction= new RedoActionHandler(getEditorSite(), undoContext); - PlatformUI.getWorkbench().getHelpSystem().setHelp(redoAction, IAbstractTextEditorHelpContextIds.REDO_ACTION); - redoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.REDO); - registerAction(ITextEditorActionConstants.REDO, redoAction); - } - } - - private IEditorSite getEditorSite() { - return editorSite; - } - - - /** - * Registers the given undo/redo action under the given ID and - * ensures that previously installed actions get disposed. It - * also takes care of re-registering the new action with the - * global action handler. - * - * @param actionId the action id under which to register the action - * @param action the action to register - * @since 3.1 - */ - private void registerAction(String actionId, IAction action) { - IAction oldAction= getAction(actionId); - if (oldAction instanceof OperationHistoryActionHandler) - ((OperationHistoryActionHandler)oldAction).dispose(); - - setAction(actionId, action); - - IActionBars actionBars= getEditorSite().getActionBars(); - if (actionBars != null) - actionBars.setGlobalActionHandler(actionId, action); - } - - - /* - * @see ITextEditor#getAction(String) - */ - public IAction getAction(String actionID) { - assert actionID != null; - IAction action= (IAction) fActions.get(actionID); - -// if (action == null) { -// action= findContributedAction(actionID); -// if (action != null) -// setAction(actionID, action); -// } - - return action; - } - - /* - * @see ITextEditor#setAction(String, IAction) - */ - public void setAction(String actionID, IAction action) { - assert actionID != null; - if (action == null) { - action= (IAction) fActions.remove(actionID); - if (action != null) - fActivationCodeTrigger.unregisterActionFromKeyActivation(action); - } else { - fActions.put(actionID, action); - fActivationCodeTrigger.registerActionForKeyActivation(action); - } - } - - /** - * Initializes the activation code trigger. - * - * @since 2.1 - */ - private void initializeActivationCodeTrigger() { - fActivationCodeTrigger.install(); - fActivationCodeTrigger.setScopes(fKeyBindingScopes); - } - - /** - * Internal key verify listener for triggering action activation codes. - */ - class ActivationCodeTrigger implements VerifyKeyListener { - - /** Indicates whether this trigger has been installed. */ - private boolean fIsInstalled= false; - /** - * The key binding service to use. - * @since 2.0 - */ - private IKeyBindingService fKeyBindingService; - - /* - * @see VerifyKeyListener#verifyKey(org.eclipse.swt.events.VerifyEvent) - */ - public void verifyKey(VerifyEvent event) { - - ActionActivationCode code= null; - int size= fActivationCodes.size(); - for (int i= 0; i < size; i++) { - code= (ActionActivationCode) fActivationCodes.get(i); - if (code.matches(event)) { - IAction action= getAction(code.fActionId); - if (action != null) { - - if (action instanceof IUpdate) - ((IUpdate) action).update(); - - if (!action.isEnabled() && action instanceof IReadOnlyDependent) { - IReadOnlyDependent dependent= (IReadOnlyDependent) action; - boolean writable= dependent.isEnabled(true); - if (writable) { - event.doit= false; - return; - } - } else if (action.isEnabled()) { - event.doit= false; - action.run(); - return; - } - } - } - } - } - - /** - * Installs this trigger on the editor's text widget. - * @since 2.0 - */ - public void install() { - if (!fIsInstalled) { - - if (sourceViewer instanceof ITextViewerExtension) { - ITextViewerExtension e= (ITextViewerExtension) sourceViewer; - e.prependVerifyKeyListener(this); - } else { - StyledText text= sourceViewer.getTextWidget(); - text.addVerifyKeyListener(this); - } - - fKeyBindingService= getEditorSite().getKeyBindingService(); - fIsInstalled= true; - } - } - - /** - * Uninstalls this trigger from the editor's text widget. - * @since 2.0 - */ - public void uninstall() { - if (fIsInstalled) { - - if (sourceViewer instanceof ITextViewerExtension) { - ITextViewerExtension e= (ITextViewerExtension) sourceViewer; - e.removeVerifyKeyListener(this); - } else if (sourceViewer != null) { - StyledText text= sourceViewer.getTextWidget(); - if (text != null && !text.isDisposed()) - text.removeVerifyKeyListener(fActivationCodeTrigger); - } - - fIsInstalled= false; - fKeyBindingService= null; - } - } - - /** - * Registers the given action for key activation. - * @param action the action to be registered - * @since 2.0 - */ - public void registerActionForKeyActivation(IAction action) { - if (action.getActionDefinitionId() != null) - fKeyBindingService.registerAction(action); - } - - /** - * The given action is no longer available for key activation - * @param action the action to be unregistered - * @since 2.0 - */ - public void unregisterActionFromKeyActivation(IAction action) { - if (action.getActionDefinitionId() != null) - fKeyBindingService.unregisterAction(action); - } - - /** - * Sets the key binding scopes for this editor. - * @param keyBindingScopes the key binding scopes - * @since 2.1 - */ - public void setScopes(String[] keyBindingScopes) { - if (keyBindingScopes != null && keyBindingScopes.length > 0) - fKeyBindingService.setScopes(keyBindingScopes); - } - } - - /** - * Representation of action activation codes. - */ - static class ActionActivationCode { - - /** The action id. */ - public String fActionId; - /** The character. */ - public char fCharacter; - /** The key code. */ - public int fKeyCode= -1; - /** The state mask. */ - public int fStateMask= SWT.DEFAULT; - - /** - * Creates a new action activation code for the given action id. - * @param actionId the action id - */ - public ActionActivationCode(String actionId) { - fActionId= actionId; - } - - /** - * Returns true if this activation code matches the given verify event. - * @param event the event to test for matching - * @return whether this activation code matches event - */ - public boolean matches(VerifyEvent event) { - return (event.character == fCharacter && - (fKeyCode == -1 || event.keyCode == fKeyCode) && - (fStateMask == SWT.DEFAULT || event.stateMask == fStateMask)); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextEditorForm.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextEditorForm.java deleted file mode 100644 index aebc146cf72..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextEditorForm.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.swt.custom.ViewForm; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.forms.widgets.FormToolkit; - -/** - * A composite for laying out the default rich text editor in an Eclipse form. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextEditorForm extends ViewForm { - - /** - * Creates a new instance. - * - * @param parent - * the parent control - * @param style - * the style for this control - */ - public RichTextEditorForm(Composite parent, int style) { - super(parent, style); - } - - /** - * @see org.eclipse.swt.widgets#getData(String key) - */ - public Object getData(String key) { - if (key != null && key.equals(FormToolkit.KEY_DRAW_BORDER)) { - // Return a text border to get the FormToolkit's BorderPainter to - // paint a border for the rich text editor. - return FormToolkit.TEXT_BORDER; - } - return super.getData(); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextFormToolkit.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextFormToolkit.java deleted file mode 100644 index 7809c45f4f3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextFormToolkit.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.forms.widgets.FormToolkit; - -/** - * A helper toolkit for creating a rich text control and editor that can be - * added to an Eclipse form. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextFormToolkit { - - /** - * Creates a rich text control and adapts it to be used in a form. - * - * @param toolkit - * the form toolkit - * @param parent - * the parent control - * @param text - * the initial text for the viewer - * @param style - * the initial style for the viewer - * @param basePath - * the base path used for resolving hrefs - * @return a new IRichText instance - */ - public static IRichText createRichText(FormToolkit toolkit, - Composite parent, String text, int style) { - IRichText richText = new RichText(parent, toolkit.getBorderStyle() - | style | toolkit.getOrientation()); - richText.getControl().setData(FormToolkit.KEY_DRAW_BORDER, - FormToolkit.TEXT_BORDER); - if (text != null) { - richText.setText(text); - } - return richText; - } - - /** - * Creates a rich text editor and adapts it to be used in a form. - * - * @param toolkit - * the form toolkit - * @param parent - * the parent control - * @param text - * the initial text for the viewer - * @param style - * the initial style for the viewer - * @param basePath - * the base path used for resolving hrefs - * @return a new IRichText instance - */ - public static IRichTextEditor createRichTextEditor(FormToolkit toolkit, - Composite parent, String text, int style, IEditorSite editorSite) { - IRichTextEditor richTextEditor = new RichTextEditor(parent, toolkit - .getBorderStyle() - | style | toolkit.getOrientation(), editorSite); - richTextEditor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, - FormToolkit.TEXT_BORDER); - if (text != null) { - richTextEditor.setInitialText(text); - } - return richTextEditor; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextImages.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextImages.java deleted file mode 100644 index db51e92f1f7..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextImages.java +++ /dev/null @@ -1,475 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.graphics.Image; - -/** - * Shared images used by the default rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextImages { - - private static final String ETOOL16 = "full/etool16/"; //$NON-NLS-1$ - - private static final String DTOOL16 = "full/dtool16/"; //$NON-NLS-1$ - - private static final RichTextPlugin richTextPlugin = RichTextPlugin - .getDefault(); - - public static final String IMG_PATH_ADD_IMAGE = ETOOL16 + "AddImage.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_LINE = ETOOL16 + "AddLine.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_LINK = ETOOL16 + "AddLink.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_ORDERED_LIST = ETOOL16 - + "AddOrderedList.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_TABLE = ETOOL16 + "AddTable.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_UNORDERED_LIST = ETOOL16 - + "AddUnorderedList.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_BOLD = ETOOL16 + "Bold.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_CLEAR_CONTENT = ETOOL16 - + "ClearContent.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_COPY = ETOOL16 + "Copy.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_CUT = ETOOL16 + "Cut.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_FIND_REPLACE = ETOOL16 - + "FindReplace.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_INDENT = ETOOL16 + "Indent.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ITALIC = ETOOL16 + "Italic.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_JUSTIFY_CENTER = ETOOL16 - + "JustifyCenter.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_JUSTIFY_FULL = ETOOL16 - + "JustifyFull.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_JUSTIFY_LEFT = ETOOL16 - + "JustifyLeft.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_JUSTIFY_RIGHT = ETOOL16 - + "JustifyRight.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_OUTDENT = ETOOL16 + "Outdent.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_PASTE = ETOOL16 + "Paste.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_PASTE_PLAIN_TEXT = ETOOL16 + "PastePlainText.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_STRIKE_THROUGH = ETOOL16 - + "StrikeThrough.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_SUBSCRIPT = ETOOL16 + "Subscript.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_SUPERSCRIPT = ETOOL16 - + "Superscript.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_UNDERLINE = ETOOL16 + "Underline.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_TIDY = ETOOL16 + "TidyHTML.gif"; //$NON-NLS-1$ - - public static final String IMG_PATH_ADD_CODE = ETOOL16 + "AddCode.gif"; //$NON-NLS-1$ - - public static final Image IMG_ADD_IMAGE = richTextPlugin - .getSharedImage(IMG_PATH_ADD_IMAGE); - - public static final Image IMG_ADD_LINE = richTextPlugin - .getSharedImage(IMG_PATH_ADD_LINE); - - public static final Image IMG_ADD_LINK = richTextPlugin - .getSharedImage(IMG_PATH_ADD_LINK); - - public static final Image IMG_ADD_ORDERED_LIST = richTextPlugin - .getSharedImage(IMG_PATH_ADD_ORDERED_LIST); - - public static final Image IMG_ADD_TABLE = richTextPlugin - .getSharedImage(IMG_PATH_ADD_TABLE); - - public static final Image IMG_ADD_UNORDERED_LIST = richTextPlugin - .getSharedImage(IMG_PATH_ADD_UNORDERED_LIST); - - public static final Image IMG_BOLD = richTextPlugin - .getSharedImage(IMG_PATH_BOLD); - - public static final Image IMG_CLEAR_CONTENT = richTextPlugin - .getSharedImage(IMG_PATH_CLEAR_CONTENT); - - public static final Image IMG_COPY = richTextPlugin - .getSharedImage(IMG_PATH_COPY); - - public static final Image IMG_CUT = richTextPlugin - .getSharedImage(IMG_PATH_CUT); - - public static final Image IMG_FIND_REPLACE = richTextPlugin - .getSharedImage(IMG_PATH_FIND_REPLACE); - - public static final Image IMG_INDENT = richTextPlugin - .getSharedImage(IMG_PATH_INDENT); - - public static final Image IMG_ITALIC = richTextPlugin - .getSharedImage(IMG_PATH_ITALIC); - - public static final Image IMG_JUSTIFY_CENTER = richTextPlugin - .getSharedImage(IMG_PATH_JUSTIFY_CENTER); - - public static final Image IMG_JUSTIFY_FULL = richTextPlugin - .getSharedImage(IMG_PATH_JUSTIFY_FULL); - - public static final Image IMG_JUSTIFY_LEFT = richTextPlugin - .getSharedImage(IMG_PATH_JUSTIFY_LEFT); - - public static final Image IMG_JUSTIFY_RIGHT = richTextPlugin - .getSharedImage(IMG_PATH_JUSTIFY_RIGHT); - - public static final Image IMG_OUTDENT = richTextPlugin - .getSharedImage(IMG_PATH_OUTDENT); - - public static final Image IMG_PASTE = richTextPlugin - .getSharedImage(IMG_PATH_PASTE); - - public static final Image IMG_PASTE_PLAIN_TEXT = richTextPlugin - .getSharedImage(IMG_PATH_PASTE_PLAIN_TEXT); - - public static final Image IMG_STRIKE_THROUGH = richTextPlugin - .getSharedImage(IMG_PATH_STRIKE_THROUGH); - - public static final Image IMG_SUBSCRIPT = richTextPlugin - .getSharedImage(IMG_PATH_SUBSCRIPT); - - public static final Image IMG_SUPERSCRIPT = richTextPlugin - .getSharedImage(IMG_PATH_SUPERSCRIPT); - - public static final Image IMG_UNDERLINE = richTextPlugin - .getSharedImage(IMG_PATH_UNDERLINE); - public static final Image IMG_TIDY = richTextPlugin - .getSharedImage(IMG_PATH_TIDY); - - public static final ImageDescriptor IMG_DESC_ADD_IMAGE = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_IMAGE); - - public static final ImageDescriptor IMG_DESC_ADD_LINE = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_LINE); - - public static final ImageDescriptor IMG_DESC_ADD_LINK = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_LINK); - - public static final ImageDescriptor IMG_DESC_ADD_ORDERED_LIST = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_ORDERED_LIST); - - public static final ImageDescriptor IMG_DESC_ADD_TABLE = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_TABLE); - - public static final ImageDescriptor IMG_DESC_ADD_UNORDERED_LIST = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_UNORDERED_LIST); - - public static final ImageDescriptor IMG_DESC_BOLD = richTextPlugin - .getImageDescriptor(IMG_PATH_BOLD); - - public static final ImageDescriptor IMG_DESC_CLEAR_CONTENT = richTextPlugin - .getImageDescriptor(IMG_PATH_CLEAR_CONTENT); - - public static final ImageDescriptor IMG_DESC_COPY = richTextPlugin - .getImageDescriptor(IMG_PATH_COPY); - - public static final ImageDescriptor IMG_DESC_CUT = richTextPlugin - .getImageDescriptor(IMG_PATH_CUT); - - public static final ImageDescriptor IMG_DESC_FIND_REPLACE = richTextPlugin - .getImageDescriptor(IMG_PATH_FIND_REPLACE); - - public static final ImageDescriptor IMG_DESC_INDENT = richTextPlugin - .getImageDescriptor(IMG_PATH_INDENT); - - public static final ImageDescriptor IMG_DESC_ITALIC = richTextPlugin - .getImageDescriptor(IMG_PATH_ITALIC); - - public static final ImageDescriptor IMG_DESC_JUSTIFY_CENTER = richTextPlugin - .getImageDescriptor(IMG_PATH_JUSTIFY_CENTER); - - public static final ImageDescriptor IMG_DESC_JUSTIFY_FULL = richTextPlugin - .getImageDescriptor(IMG_PATH_JUSTIFY_FULL); - - public static final ImageDescriptor IMG_DESC_JUSTIFY_LEFT = richTextPlugin - .getImageDescriptor(IMG_PATH_JUSTIFY_LEFT); - - public static final ImageDescriptor IMG_DESC_JUSTIFY_RIGHT = richTextPlugin - .getImageDescriptor(IMG_PATH_JUSTIFY_RIGHT); - - public static final ImageDescriptor IMG_DESC_OUTDENT = richTextPlugin - .getImageDescriptor(IMG_PATH_OUTDENT); - - public static final ImageDescriptor IMG_DESC_PASTE = richTextPlugin - .getImageDescriptor(IMG_PATH_PASTE); - - public static final ImageDescriptor IMG_DESC_PASTE_PLAIN_TEXT = richTextPlugin - .getImageDescriptor(IMG_PATH_PASTE_PLAIN_TEXT); - - public static final ImageDescriptor IMG_DESC_STRIKE_THROUGH = richTextPlugin - .getImageDescriptor(IMG_PATH_STRIKE_THROUGH); - - public static final ImageDescriptor IMG_DESC_SUBSCRIPT = richTextPlugin - .getImageDescriptor(IMG_PATH_SUBSCRIPT); - - public static final ImageDescriptor IMG_DESC_SUPERSCRIPT = richTextPlugin - .getImageDescriptor(IMG_PATH_SUPERSCRIPT); - - public static final ImageDescriptor IMG_DESC_UNDERLINE = richTextPlugin - .getImageDescriptor(IMG_PATH_UNDERLINE); - - public static final ImageDescriptor IMG_DESC_TIDY = richTextPlugin - .getImageDescriptor(IMG_PATH_TIDY); - - public static final ImageDescriptor IMG_DESC_ADD_CODE = richTextPlugin - .getImageDescriptor(IMG_PATH_ADD_CODE); - - - public static final String DISABLED_IMG_PATH_ADD_IMAGE = DTOOL16 - + "AddImage.gif"; //$NON-NLS-1$ - -// public static final String DISABLED_IMG_PATH_ADD_LINE = DTOOL16 -// + "AddLine.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ADD_LINK = DTOOL16 - + "AddLink.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ADD_ORDERED_LIST = DTOOL16 - + "AddOrderedList.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ADD_TABLE = DTOOL16 - + "AddTable.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ADD_UNORDERED_LIST = DTOOL16 - + "AddUnorderedList.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_BOLD = DTOOL16 + "Bold.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_CLEAR_CONTENT = DTOOL16 - + "ClearContent.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_COPY = DTOOL16 + "Copy.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_CUT = DTOOL16 + "Cut.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_FIND_REPLACE = DTOOL16 - + "FindReplace.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_INDENT = DTOOL16 - + "Indent.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ITALIC = DTOOL16 - + "Italic.gif"; //$NON-NLS-1$ - -// public static final String DISABLED_IMG_PATH_JUSTIFY_CENTER = DTOOL16 -// + "JustifyCenter.gif"; //$NON-NLS-1$ -// -// public static final String DISABLED_IMG_PATH_JUSTIFY_FULL = DTOOL16 -// + "JustifyFull.gif"; //$NON-NLS-1$ -// -// public static final String DISABLED_IMG_PATH_JUSTIFY_LEFT = DTOOL16 -// + "JustifyLeft.gif"; //$NON-NLS-1$ -// -// public static final String DISABLED_IMG_PATH_JUSTIFY_RIGHT = DTOOL16 -// + "JustifyRight.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_OUTDENT = DTOOL16 - + "Outdent.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_PASTE = DTOOL16 + "Paste.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_PASTE_PLAIN_TEXT = DTOOL16 + "PastePlainText.gif"; //$NON-NLS-1$ - -// public static final String DISABLED_IMG_PATH_STRIKE_THROUGH = DTOOL16 -// + "StrikeThrough.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_SUBSCRIPT = DTOOL16 - + "Subscript.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_SUPERSCRIPT = DTOOL16 - + "Superscript.gif"; //$NON-NLS-1$ - - private static String DISABLED_IMG_PATH_TIDY = DTOOL16 + "TidyHTML.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_UNDERLINE = DTOOL16 - + "Underline.gif"; //$NON-NLS-1$ - - public static final String DISABLED_IMG_PATH_ADD_CODE = DTOOL16 - + "AddCode.gif"; //$NON-NLS-1$ - - public static final Image DISABLED_IMG_ADD_IMAGE = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ADD_IMAGE); - -// public static final Image DISABLED_IMG_ADD_LINE = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_ADD_LINE); - - public static final Image DISABLED_IMG_ADD_LINK = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ADD_LINK); - - public static final Image DISABLED_IMG_ADD_ORDERED_LIST = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ADD_ORDERED_LIST); - - public static final Image DISABLED_IMG_ADD_TABLE = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ADD_TABLE); - - public static final Image DISABLED_IMG_ADD_UNORDERED_LIST = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ADD_UNORDERED_LIST); - - public static final Image DISABLED_IMG_BOLD = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_BOLD); - - public static final Image DISABLED_IMG_CLEAR_CONTENT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_CLEAR_CONTENT); - - public static final Image DISABLED_IMG_COPY = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_COPY); - - public static final Image DISABLED_IMG_CUT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_CUT); - - public static final Image DISABLED_IMG_FIND_REPLACE = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_FIND_REPLACE); - - public static final Image DISABLED_IMG_INDENT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_INDENT); - - public static final Image DISABLED_IMG_ITALIC = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_ITALIC); - -// public static final Image DISABLED_IMG_JUSTIFY_CENTER = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_JUSTIFY_CENTER); -// -// public static final Image DISABLED_IMG_JUSTIFY_FULL = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_JUSTIFY_FULL); -// -// public static final Image DISABLED_IMG_JUSTIFY_LEFT = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_JUSTIFY_LEFT); -// -// public static final Image DISABLED_IMG_JUSTIFY_RIGHT = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_JUSTIFY_RIGHT); - - public static final Image DISABLED_IMG_OUTDENT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_OUTDENT); - - public static final Image DISABLED_IMG_PASTE = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_PASTE); - -// public static final Image DISABLED_IMG_STRIKE_THROUGH = richTextPlugin -// .getSharedImage(DISABLED_IMG_PATH_STRIKE_THROUGH); - - public static final Image DISABLED_IMG_SUBSCRIPT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_SUBSCRIPT); - - public static final Image DISABLED_IMG_SUPERSCRIPT = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_SUPERSCRIPT); - - public static final Image DISABLED_IMG_UNDERLINE = richTextPlugin - .getSharedImage(DISABLED_IMG_PATH_UNDERLINE); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_IMAGE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_IMAGE); - -// public static final ImageDescriptor DISABLED_IMG_DESC_ADD_LINE = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_ADD_LINE); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_LINK = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_LINK); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_ORDERED_LIST = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_ORDERED_LIST); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_TABLE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_TABLE); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_UNORDERED_LIST = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_UNORDERED_LIST); - - public static final ImageDescriptor DISABLED_IMG_DESC_BOLD = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_BOLD); - - public static final ImageDescriptor DISABLED_IMG_DESC_CLEAR_CONTENT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_CLEAR_CONTENT); - - public static final ImageDescriptor DISABLED_IMG_DESC_COPY = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_COPY); - - public static final ImageDescriptor DISABLED_IMG_DESC_CUT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_CUT); - - public static final ImageDescriptor DISABLED_IMG_DESC_FIND_REPLACE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_FIND_REPLACE); - - public static final ImageDescriptor DISABLED_IMG_DESC_INDENT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_INDENT); - - public static final ImageDescriptor DISABLED_IMG_DESC_ITALIC = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ITALIC); - -// public static final ImageDescriptor DISABLED_IMG_DESC_JUSTIFY_CENTER = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_JUSTIFY_CENTER); -// -// public static final ImageDescriptor DISABLED_IMG_DESC_JUSTIFY_FULL = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_JUSTIFY_FULL); -// -// public static final ImageDescriptor DISABLED_IMG_DESC_JUSTIFY_LEFT = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_JUSTIFY_LEFT); -// -// public static final ImageDescriptor DISABLED_IMG_DESC_JUSTIFY_RIGHT = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_JUSTIFY_RIGHT); - - public static final ImageDescriptor DISABLED_IMG_DESC_OUTDENT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_OUTDENT); - - public static final ImageDescriptor DISABLED_IMG_DESC_PASTE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_PASTE); - - public static final ImageDescriptor DISABLED_IMG_DESC_PASTE_PLAIN_TEXT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_PASTE_PLAIN_TEXT); - -// public static final ImageDescriptor DISABLED_IMG_DESC_STRIKE_THROUGH = richTextPlugin -// .getImageDescriptor(DISABLED_IMG_PATH_STRIKE_THROUGH); - - public static final ImageDescriptor DISABLED_IMG_DESC_SUBSCRIPT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_SUBSCRIPT); - - public static final ImageDescriptor DISABLED_IMG_DESC_SUPERSCRIPT = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_SUPERSCRIPT); - - public static final ImageDescriptor DISABLED_IMG_DESC_UNDERLINE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_UNDERLINE); - - public static final ImageDescriptor DISABLED_IMG_DESC_TIDY = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_TIDY); - - public static final ImageDescriptor DISABLED_IMG_DESC_ADD_CODE = richTextPlugin - .getImageDescriptor(DISABLED_IMG_PATH_ADD_CODE); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextListener.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextListener.java deleted file mode 100644 index 8e6116ab635..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextListener.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.swt.widgets.Listener; - -/** - * Listens to a rich text editing event. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextListener { - - private int eventType; - - private Listener listener; - - /** - * Creates a new instance. - * - * @param eventType - * the event type - * @param listener - * the event listener - */ - public RichTextListener(int eventType, Listener listener) { - this.eventType = eventType; - this.listener = listener; - } - - /** - * Returns the event type. - * - * @return the event type - */ - public int getEventType() { - return eventType; - } - - /** - * Returns the event listener. - */ - public Listener getListener() { - return listener; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java deleted file mode 100644 index b204b83a44b..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextPlugin.java +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import java.util.Date; - -import org.eclipse.epf.common.ui.AbstractPlugin; -import org.osgi.framework.BundleContext; - -/** - * The Rich Text plug-in class. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextPlugin extends AbstractPlugin { - - // The shared plug-in instance. - private static RichTextPlugin plugin; - - // The date and time when this plug-in was started. - private Date startTime; - - /** - * Default constructor. - */ - public RichTextPlugin() { - super(); - plugin = this; - } - - /** - * @see AbstractPlugin#start(BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - startTime = new Date(); - } - - /** - * @see AbstractPlugin#stop(BundleContext) - */ - public void stop(BundleContext context) throws Exception { - super.stop(context); - plugin = null; - } - - /** - * Returns the shared plug-in instance. - */ - public static RichTextPlugin getDefault() { - return plugin; - } - - /** - * Returns the date and time when this plug-in was started. - */ - public Date getStartTime() { - return startTime; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextResources.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextResources.java deleted file mode 100644 index 0dc234b29f3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextResources.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import org.eclipse.osgi.util.NLS; - -/** - * The RichText resources. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public final class RichTextResources extends NLS { - - private static String BUNDLE_NAME = RichTextResources.class - .getPackage().getName() + ".Resources"; //$NON-NLS-1$ - - private RichTextResources() { - // Do not instantiate. - } - - public static String fontNameAction_CSS_Default; - public static String fontNameAction_CSS_Default_Mozilla; - public static String fontNameAction_DefaultFontName; - public static String fontStyle_normal; - public static String fontStyle_sectionHeading; - public static String fontStyle_subsectionHeading; - public static String fontStyle_subSubsectionHeading; - public static String fontStyle_quote; - public static String fontStyle_codeSample; - public static String blockTag_paragraph; - public static String blockTag_heading1; - public static String blockTag_heading2; - public static String blockTag_heading3; - public static String blockTag_heading4; - public static String blockTag_heading5; - public static String blockTag_heading6; - public static String blockTag_address; - public static String blockTag_preformattedText; - public static String fontName_default; - public static String fontName_arial; - public static String fontName_courierNew; - public static String fontName_timesNewRoman; - public static String fontName_verdana; - public static String addHorizontalBarAction_toolTipText; - public static String addImageAction_toolTipText; - public static String addLineAction_toolTipText; - public static String addLinkAction_toolTipText; - public static String addOrderedListAction_toolTipText; - public static String addTableAction_toolTipText; - public static String addUnorderedListAction_toolTipText; - public static String boldAction_toolTipText; - public static String clearContentAction_toolTipText; - public static String copyAction_toolTipText; - public static String cutAction_toolTipText; - public static String findReplaceAction_toolTipText; - public static String indentAction_toolTipText; - public static String italicAction_toolTipText; - public static String justifyCenterAction_toolTipText; - public static String justifyFullAction_toolTipText; - public static String justifyLeftAction_toolTipText; - public static String justifyRightAction_toolTipText; - public static String outdentAction_toolTipText; - public static String pasteAction_toolTipText; - public static String pastePlainTextAction_toolTipText; - public static String subscriptAction_toolTipText; - public static String superscriptAction_toolTipText; - public static String underlineAction_toolTipText; - public static String fontStyleAction_toolTipText; - public static String blockTagAction_toolTipText; - public static String fontNameAction_toolTipText; - public static String fontSizeAction_toolTipText; - public static String cutAction_text; - public static String copyAction_text; - public static String pasteAction_text; - public static String pastePlainTextAction_text; - public static String richTextTab_text; - public static String richTextTab_toolTipText; - public static String htmlTab_text; - public static String htmlTab_toolTipText; - public static String addImageDialog_title; - public static String addLinkDialog_title; - public static String addTableDialog_title; - public static String findReplaceDialog_title; - public static String urlDisplayNameLabel_text; - public static String urlLabel_text; - public static String summaryLabel_text; - public static String captionLabel_text; - public static String rowsLabel_text; - public static String columnsLabel_text; - public static String widthLabel_text; - public static String tableStyleLabel_text; - public static String tableHeaderNone_text; - public static String tableHeaderCols_text; - public static String tableHeaderRows_text; - public static String tableHeaderBoth_text; - public static String browseButton_text; - public static String clearContentDialog_title; - public static String clearContentDialog_text; - public static String findLabel_text; - public static String replaceLabel_text; - public static String optionsGroup_text; - public static String caseSensitiveCheckbox_text; - public static String wholeWordCheckbox_text; - public static String directionGroup_text; - public static String forwardRadioButton_text; - public static String backwardRadioButton_text; - public static String findButton_text; - public static String replaceButton_text; - public static String replaceFindButton_text; - public static String replaceallButton_text; - public static String FindReplace_Status_noMatch_label; - public static String maxCharsPerLineLabel_text; - public static String indentHTMLCheckbox_text; - public static String indentSizeLabel_text; - public static String tidy_clean_text; - public static String tidy_cleaner_text; - public static String tidy_cleanest_text; - public static String tidy_clean_toolTipText; - public static String tidy_cleaner_toolTipText; - public static String tidy_cleanest_toolTipText; - public static String addCodeAction_toolTipText; - public static String addCodeDialog_title; - public static String addCodeDialog_Msg; - - static { - NLS.initializeMessages(BUNDLE_NAME, RichTextResources.class); - } -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextSelection.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextSelection.java deleted file mode 100644 index ee9c7671704..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextSelection.java +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -/** - * Models a text selection in a rich text control and editor. - * - * @author Jeff Hardy - * @since 1.2 - */ -public class RichTextSelection { - - // The control's text selection. - protected String text = ""; //$NON-NLS-1$ - - // The control's text selection offset - protected int offsetStart = 0; - - // The control's text selection font - protected String fontName = ""; //$NON-NLS-1$ - - // The control's text selection font size - // could be in point size (12pt), or HTML size (1-7) - protected String fontSize = ""; //$NON-NLS-1$ - - // The control's text current style - protected String blockStyle = ""; //$NON-NLS-1$ - - // The control's text current flags - protected int flags = 0; - - // Text status flags - public static final int BOLD = 1; - - public static final int ITALIC = BOLD << 1; - - public static final int UNDERLINE = ITALIC << 1; - - public static final int SUBSCRIPT = UNDERLINE << 1; - - public static final int SUPERSCRIPT = SUBSCRIPT << 1; - - public String getBlockStyle() { - return blockStyle; - } - - public void setBlockStyle(String blockStyle) { - this.blockStyle = blockStyle; - } - - public int getFlags() { - return flags; - } - - public void setFlags(int flags) { - this.flags = flags; - } - - public String getFontName() { - return fontName; - } - - public void setFontName(String fontName) { - this.fontName = fontName; - } - - public String getFontSize() { - return fontSize; - } - - public void setFontSize(String fontSize) { - this.fontSize = fontSize; - } - - public int getOffsetStart() { - return offsetStart; - } - - public void setOffsetStart(int offsetStart) { - this.offsetStart = offsetStart; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public boolean isBold() { - return (flags & BOLD) != 0; - } - - public boolean isItalic() { - return (flags & ITALIC) != 0; - } - - public boolean isUnderLine() { - return (flags & UNDERLINE) != 0; - } - - public boolean isSubscript() { - return (flags & SUBSCRIPT) != 0; - } - - public boolean isSuperscript() { - return (flags & SUPERSCRIPT) != 0; - } - - /** - * Clears the selection info - */ - public void clear() { - text = ""; //$NON-NLS-1$ - offsetStart = 0; - fontName = ""; //$NON-NLS-1$ - fontSize = ""; //$NON-NLS-1$ - blockStyle = ""; //$NON-NLS-1$ - flags = 0; - } - - public String toString() { - String str = "Text: " + text + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ - str += "fontName: " + fontName + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ - str += "fontSize: " + fontSize + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ - str += "blockStyle: " + blockStyle + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ - str += "flags: " + flags + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ - return str; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextToolBar.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextToolBar.java deleted file mode 100644 index 70252607447..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/RichTextToolBar.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.epf.richtext.actions.IRichTextAction; -import org.eclipse.epf.richtext.actions.RichTextAction; -import org.eclipse.epf.richtext.actions.RichTextComboAction; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.action.ToolBarManager; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.ToolItem; - -/** - * The default rich text tool bar implementation. - * - * Split into 2 toolbars (one for CCombos, one for buttons) for tabbing purposes. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class RichTextToolBar implements IRichTextToolBar { - - // The parent rich text control. - private IRichText richText; - - // If true, add a new tool bar. - private boolean addToolBar = true; - - // The current tool bar manager used to populate the tool actions. - private ToolBarManager toolbarMgr; - - // The current tool bar manager used to populate the tool actions. - private ToolBarManager toolbarMgrCombo; - - // The action items in the tool bar(s). - private List actionItems = new ArrayList(); - - private static int lastWidth = -1; - - protected Composite parent; - - /** - * Creates a new instance. - * - * @param parent - * the parent composite - * @param style - * the tool bar style - * @param richText - * the parent rich text control - */ - public RichTextToolBar(Composite parent, int style, IRichText richText) { - this.parent = parent; - this.richText = richText; - - addToolBar(); - } - - public void addAction(final IAction action) { - if (action != null) { - ActionContributionItem item = new ActionContributionItem(action); - toolbarMgr.add(item); - toolbarMgr.update(true); - actionItems.add(item); - } - } - - /** - * Adds a combo action to the tool bar. - * - * @param action - * the action to add - */ - public void addAction(final RichTextComboAction item) { - if (item != null) { - item.init(); - toolbarMgrCombo.add(item); - toolbarMgrCombo.update(true); - actionItems.add(item); - } - } - - /** - * Adds a separator to the tool bar. - */ - public void addSeparator() { - toolbarMgr.add(new Separator()); - } - - /** - * Updates the toolbar state. - *

    - * Enables/disables actions depending on the currently selected - * RichTextEditor tab (RichText vs. HTML) - * - * @param editable - * specifies whether to enable non-ReadOnly commands - */ - public void updateToolBar(boolean editable) { - boolean richTextMode = true; - if (richText instanceof RichTextEditor - && ((RichTextEditor) richText).isHTMLTabSelected()) { - richTextMode = false; - } - for (Iterator i = actionItems.iterator(); i.hasNext();) { - Object item = i.next(); - if (item instanceof ToolItem) { - boolean enabledToolItem = true; - ToolItem toolItem = (ToolItem) item; - IRichTextAction action = (IRichTextAction) toolItem.getData(); - if (action != null && !editable - && action.disableInReadOnlyMode()) { - enabledToolItem = false; - } - if (action != null && !richTextMode - && action.disableInSourceMode()) { - enabledToolItem = false; - } - toolItem.setEnabled(enabledToolItem); - } else if (item instanceof Combo) { - if (richTextMode && editable) { - ((Combo) item).setEnabled(true); - } else { - ((Combo) item).setEnabled(false); - } - } else if (item instanceof ActionContributionItem) { - boolean enabledToolItem = true; - RichTextAction action = (RichTextAction) ((ActionContributionItem) item) - .getAction(); - if (action != null && !editable - && action.disableInReadOnlyMode()) { - enabledToolItem = false; - } - if (action != null && !richTextMode - && action.disableInSourceMode()) { - enabledToolItem = false; - } - action.setEnabled(enabledToolItem); - } - } - } - - /** - * Adds a tool bar, if necessary, to contain a button action or separator. - */ - protected void addToolBar() { - if (addToolBar) { - toolbarMgrCombo = new ToolBarManager(SWT.WRAP | SWT.FLAT | parent.getStyle()); - toolbarMgrCombo.createControl(parent); - toolbarMgr = new ToolBarManager(SWT.WRAP | SWT.FLAT | parent.getStyle()); - toolbarMgr.createControl(parent); - addToolBar = false; - } - } - - public ToolBarManager getToolbarMgr() { - return toolbarMgr; - } - - public ToolBarManager getToolbarMgrCombo() { - return toolbarMgrCombo; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddCodeAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddCodeAction.java deleted file mode 100644 index 49a63617e24..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddCodeAction.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* -* Licensed Materials - Property of IBM -* (c) Copyright IBM Corporation 2007,2011. All Rights Reserved. -* -* Note to U.S. Government Users Restricted Rights: -* Use, duplication or disclosure restricted by GSA ADP Schedule -* Contract with IBM Corp. -*******************************************************************************/ - -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.dialogs.AddCodeDialog; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; - -public class AddCodeAction extends RichTextAction { - - public AddCodeAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_CODE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_CODE); - setToolTipText(RichTextResources.addCodeAction_toolTipText); - } - - public void execute(IRichText richText) { - if (richText != null ) { - AddCodeDialog dialog = new AddCodeDialog(Display.getCurrent().getActiveShell()); - dialog.open(); - if (dialog.getReturnCode() == Window.OK) { - String html = RichText.workaroundForObjectParamNode(dialog.getCode()); - richText.executeCommand(RichTextCommand.ADD_HTML, html); - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddImageAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddImageAction.java deleted file mode 100644 index c5b9ece213b..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddImageAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.dialogs.AddImageDialog; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; - -/** - * Adds an image to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddImageAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddImageAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_IMAGE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_IMAGE); - setToolTipText(RichTextResources.addImageAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - AddImageDialog dialog = new AddImageDialog(Display.getCurrent() - .getActiveShell()); - dialog.open(); - if (dialog.getReturnCode() == Window.OK) { - String imageURL = dialog.getImage().getURL(); - if (imageURL.length() > 0) { - richText - .executeCommand(RichTextCommand.ADD_IMAGE, imageURL); - } - } - } - } - - public boolean disableInSourceMode() { - return false; - } - - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLineAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLineAction.java deleted file mode 100644 index 206e287bc88..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLineAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Adds a horizontal bar to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddLineAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddLineAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_LINE); - setToolTipText(RichTextResources.addLineAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.ADD_LINE); - } - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLinkAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLinkAction.java deleted file mode 100644 index 91d0ec0fba3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddLinkAction.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.dialogs.AddLinkDialog; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; - -/** - * Adds a link to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddLinkAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddLinkAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_LINK); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_LINK); - setToolTipText(RichTextResources.addLinkAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - AddLinkDialog dialog = new AddLinkDialog(Display.getCurrent() - .getActiveShell(), richText.getBasePath()); - dialog.open(); - if (dialog.getReturnCode() == Window.OK) { - String linkURL = dialog.getLink().getURL(); - if (linkURL.length() > 0) { - richText.executeCommand(RichTextCommand.ADD_LINK, linkURL); - } - } - } - } - - public boolean disableInSourceMode() { - return false; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddOrderedListAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddOrderedListAction.java deleted file mode 100644 index 60eca82eb26..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddOrderedListAction.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Adds an ordered list to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddOrderedListAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddOrderedListAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_ORDERED_LIST); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_ORDERED_LIST); - setToolTipText(RichTextResources.addOrderedListAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.ADD_ORDERED_LIST); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddTableAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddTableAction.java deleted file mode 100644 index e3d68dab496..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddTableAction.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.dialogs.AddTableDialog; -import org.eclipse.epf.richtext.html.Table; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; - -/** - * Adds a table to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddTableAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddTableAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_TABLE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_TABLE); - setToolTipText(RichTextResources.addTableAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - AddTableDialog dialog = new AddTableDialog(Display.getCurrent() - .getActiveShell()); - dialog.open(); - if (dialog.getReturnCode() == Window.OK) { - Table table = dialog.getTable(); - int rows = table.getRows(); - int cols = table.getColumns(); - String width = table.getWidth(); - int tableheaders = table.getTableHeaders(); - String summary = table.getSummary(); - String caption = table.getCaption(); - if (rows > 0 && cols > 0) { - richText - .executeCommand( - RichTextCommand.ADD_TABLE, - new String[] { - "" + rows, "" + cols, "" + width, summary, caption, "" + tableheaders }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - } - } - } - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddUnorderedListAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddUnorderedListAction.java deleted file mode 100644 index fa9c0b8fcef..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/AddUnorderedListAction.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Adds an unordered list to a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddUnorderedListAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public AddUnorderedListAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_ADD_UNORDERED_LIST); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_ADD_UNORDERED_LIST); - setToolTipText(RichTextResources.addUnorderedListAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.ADD_UNORDERED_LIST); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BaseRichTextAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BaseRichTextAction.java deleted file mode 100644 index e5024d72520..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BaseRichTextAction.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -/** - * The abstract base class for all rich text action. - * - * @author Kelvin Low - * @since 1.0 - */ -public abstract class BaseRichTextAction implements IBaseRichTextAction { - - protected String toolTipText; - - protected boolean enabled = true; - - /** - * Creates a new instance. - * - * @param richText - * a rich text control - */ - public BaseRichTextAction() { - } - - /** - * Returns the tool tip for the action. - * - * @return the tool tip text - */ - public String getToolTipText() { - return toolTipText; - } - - /** - * Sets the tool tip for the action. - * - * @param toolTipText - * the tool tip text - */ - public void setToolTipText(String toolTipText) { - this.toolTipText = toolTipText; - } - - /** - * Returns the enabled status of the action. - * - * @return true if enabled, false if not - */ - public boolean getEnabled() { - return enabled; - } - - /** - * Enables or disables the action. - * - * @param enabled - * if true, enable the action. if - * false, disable it. - */ - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BlockTagAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BlockTagAction.java deleted file mode 100644 index 92dd320a3a2..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BlockTagAction.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.html.BlockTag; - -/** - * Sets the font name for the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class BlockTagAction extends RichTextComboAction { - - /** - * Creates a new instance. - */ - public BlockTagAction(final IRichText richText) { - super(richText); - setToolTipText(RichTextResources.blockTagAction_toolTipText); - } - - @Override - public Collection getInput() { - Collection returnList = new ArrayList(); - - returnList.add(BlockTag.PARAGRAPH.getName()); - returnList.add(BlockTag.HEADING_1.getName()); - returnList.add(BlockTag.HEADING_2.getName()); - returnList.add(BlockTag.HEADING_3.getName()); - returnList.add(BlockTag.HEADING_4.getName()); - returnList.add(BlockTag.HEADING_5.getName()); - returnList.add(BlockTag.HEADING_6.getName()); - returnList.add(BlockTag.ADDRESS.getName()); - returnList.add(BlockTag.PREFORMATTED_TEXT.getName()); - - return returnList; - } - - - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public void execute(IRichText richText) { - if (richText != null) { - String selected = getCComboSelection(); - richText.executeCommand(RichTextCommand.FORMAT_BLOCK, selected); - } - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BoldAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BoldAction.java deleted file mode 100644 index be193e621d1..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/BoldAction.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Toggles the 'bold' attribute of the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class BoldAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public BoldAction(final IRichText richText) { - super(richText, IAction.AS_CHECK_BOX); - setImageDescriptor(RichTextImages.IMG_DESC_BOLD); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_BOLD); - setToolTipText(RichTextResources.boldAction_toolTipText); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - setChecked(richText.getSelected().isBold()); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.BOLD); - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ClearContentAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ClearContentAction.java deleted file mode 100644 index a6a6d0dc676..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ClearContentAction.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Clears the content of a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class ClearContentAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public ClearContentAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_CLEAR_CONTENT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_CLEAR_CONTENT); - setToolTipText(RichTextResources.clearContentAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * s rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - if (RichTextPlugin.getDefault().getMsgDialog().displayPrompt( - RichTextResources.clearContentDialog_title, - RichTextResources.clearContentDialog_text)) { - richText.executeCommand(RichTextCommand.CLEAR_CONTENT); - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CopyAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CopyAction.java deleted file mode 100644 index e8796f6e854..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CopyAction.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.custom.StyledText; - -/** - * Copies the selected text in a rich text control to the clipboard. - * - * @author Kelvin Low - * @since 1.0 - */ -public class CopyAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public CopyAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_COPY); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_COPY); - setToolTipText(RichTextResources.copyAction_toolTipText); - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in readonly mode. - */ - public boolean disableInReadOnlyMode() { - return false; - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return false; - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - if (richText instanceof RichTextEditor - && ((RichTextEditor) richText).isHTMLTabSelected()) { - StyledText styledText = ((RichTextEditor) richText).getSourceEdit(); - styledText.copy(); - } else { - richText.setCopyURL(); - richText.executeCommand(RichTextCommand.COPY); - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CutAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CutAction.java deleted file mode 100644 index 4e03e253654..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/CutAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.custom.StyledText; - -/** - * Cuts the selected text in the rich text control to the clipboard. - * - * @author Kelvin Low - * @since 1.0 - */ -public class CutAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public CutAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_CUT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_CUT); - setToolTipText(RichTextResources.cutAction_toolTipText); - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return false; - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - if (richText instanceof RichTextEditor - && ((RichTextEditor) richText).isHTMLTabSelected()) { - StyledText styledText = ((RichTextEditor) richText) - .getSourceEdit(); - styledText.cut(); - } else { - richText.setCopyURL(); - richText.executeCommand(RichTextCommand.CUT); - } - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FindReplaceAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FindReplaceAction.java deleted file mode 100644 index 267d7b97465..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FindReplaceAction.java +++ /dev/null @@ -1,388 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.common.utils.XMLUtil; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.dialogs.FindReplaceDialog; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.custom.StyledText; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Display; - -/** - * Finds and replaces text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class FindReplaceAction extends RichTextAction { - - /** - * Finds text sub action. - */ - public static final int FIND_TEXT = 1; - - /** - * Replaces text sub action. - */ - public static final int REPLACE_TEXT = 2; - - /** - * Replaces and finds text sub action. - */ - public static final int REPLACE_FIND_TEXT = 3; - - /** - * Replaces all sub action. - */ - public static final int REPLACE_ALL_TEXT = 4; - - /** - * Find match in a forward direction. - */ - public static final int FORWARD_MATCH = 1; - - /** - * Find match in a backward direction. - */ - public static final int BACKWARD_MATCH = -1; - - /** - * Whole word match. - */ - public static final int WHOLE_WORD_MATCH = 2; - - /** - * Case sensitive match. - */ - public static final int CASE_SENSITIVE_MATCH = 4; - - // Encoded single quote. - protected static final String ENCODED_SINGLE_QUOTE = "%sq%"; //$NON-NLS-1$ - - protected IRichText richText; - - protected StyledText styledText; - - protected boolean foundMatch = false; - - // the dialog instance - protected FindReplaceDialog dialog; - - /** - * Creates a new instance. - */ - public FindReplaceAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_FIND_REPLACE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_FIND_REPLACE); - setToolTipText(RichTextResources.findReplaceAction_toolTipText); - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in readonly mode. - */ - public boolean disableInReadOnlyMode() { - return false; - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return false; - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (this.richText == null) - this.richText = richText; - if (this.richText != null) { - try { - if (dialog != null) { - dialog.setFindOnly(!this.richText.getEditable()); - dialog.open(); - } else { - dialog = new FindReplaceDialog(Display - .getCurrent().getActiveShell(), this, !this.richText - .getEditable()); - dialog.open(); - } - } catch (Exception e) { - RichTextPlugin.getDefault().getLogger().logError(e); - } - } - } - - /** - * Returns true if a match is found. - * - * @return true if a match is found. - */ - public boolean getFoundMatch() { - return foundMatch; - } - - /** - * Executes the action. - * - * @param subAction - * the sub action to execute - * @param findText - * the find text - * @param replaceText - * the replace text - * @param matchDir - * the match direction; the value can either be - * FIND_FORWARD or FIND_BACKWARD. - * @param matchOptions - * the match options - */ - public void run(int subAction, String findText, String replaceText, - int matchDir, int matchOptions) { - styledText = null; - if (richText instanceof RichTextEditor - && ((RichTextEditor) richText).isHTMLTabSelected()) { - styledText = ((RichTextEditor) richText).getSourceEdit(); - } - if (styledText == null) { - if (findText.indexOf("'") != -1) { //$NON-NLS-1$ - findText = findText.replaceAll("'", ENCODED_SINGLE_QUOTE); //$NON-NLS-1$ - } - if (replaceText.indexOf("'") != -1) { //$NON-NLS-1$ - replaceText = replaceText.replaceAll("'", ENCODED_SINGLE_QUOTE); //$NON-NLS-1$ - } - } - try { - foundMatch = false; - int status = 0; - switch (subAction) { - case FIND_TEXT: - status = findText(findText, matchDir, matchOptions); - break; - case REPLACE_TEXT: - status = replaceText(replaceText, matchDir, matchOptions); - break; - case REPLACE_FIND_TEXT: - status = replaceFindText(findText, replaceText, matchDir, - matchOptions); - break; - case REPLACE_ALL_TEXT: - replaceAll(findText, replaceText, matchOptions); - break; - } - if (status > 0) - foundMatch = true; - } catch (Exception e) { - RichTextPlugin.getDefault().getLogger().logError(e); - } - } - - /** - * Escapes the given text. - * - * @param text - * text to be escaped - */ - protected static String escape(String text) { - if (text == null || text.length() == 0) - return ""; //$NON-NLS-1$ - StringBuffer sb = new StringBuffer(); - int textSize = text.length(); - for (int i = 0; i < textSize; i++) { - char ch = text.charAt(i); - switch (ch) { - case '<': - sb.append(XMLUtil.XML_LT); - break; - case '>': - sb.append(XMLUtil.XML_GT); - break; - case '&': - sb.append(XMLUtil.XML_AMP); - break; - default: - sb.append(ch); - break; - } - } - return sb.toString(); - } - - protected int findText(String findText, int matchDir, int matchOptions) { - int status = 0; - if (styledText != null) { - status = styledTextFindTextAndSelect(findText, matchDir, - matchOptions); - } else { - status = richText - .executeCommand(RichTextCommand.FIND_TEXT, new String[] { - findText, "" + matchDir, "" + matchOptions }); //$NON-NLS-1$ //$NON-NLS-2$ - } - return status; - } - - protected int replaceText(String replaceText, int matchDir, int matchOptions) { - int status = 0; - if (styledText != null) { - status = styledTextReplaceTextAndSelect(replaceText); - } else { - status = richText.executeCommand(RichTextCommand.REPLACE_TEXT, - new String[] { replaceText, - "" + matchDir, "" + matchOptions }); //$NON-NLS-1$ //$NON-NLS-2$ - } - return status; - } - - protected int replaceFindText(String findText, String replaceText, - int matchDir, int matchOptions) { - int status = 0; - if (styledText != null) { - styledTextReplaceTextAndSelect(replaceText); - status = styledTextFindTextAndSelect(findText, matchDir, - matchOptions); - } else { - richText.executeCommand(RichTextCommand.REPLACE_TEXT, new String[] { - replaceText, "" + matchDir, "" + matchOptions }); //$NON-NLS-1$ //$NON-NLS-2$ - status = richText - .executeCommand(RichTextCommand.FIND_TEXT, new String[] { - findText, "" + matchDir, "" + matchOptions }); //$NON-NLS-1$ //$NON-NLS-2$ - } - return status; - } - - protected void replaceAll(String findText, String replaceText, - int matchOptions) { - if (styledText != null) { - styledTextReplaceAll(findText, replaceText, matchOptions); - } else { - richText.executeCommand(RichTextCommand.REPLACE_ALL_TEXT, - new String[] { escape(findText), escape(replaceText), - "" + matchOptions }); //$NON-NLS-1$ - } - } - - protected int styledTextFindTextAndSelect(String findText, int matchDir, - int matchOptions) { - Point selectionOffset = styledText.getSelectionRange(); - int firstSelectedOffset = selectionOffset.x; - int lastSelectedOffset = selectionOffset.x + selectionOffset.y - 1; - String htmlText = styledText.getText(); - int indexOfMatch = -1; - if ((matchOptions & CASE_SENSITIVE_MATCH) == 0) { - // TODO: use toUpperCase(Locale) once library has locale attribute - htmlText = htmlText.toUpperCase(); - findText = findText.toUpperCase(); - } - do { - if (indexOfMatch != -1) { - lastSelectedOffset = indexOfMatch + 1; - firstSelectedOffset = indexOfMatch - 1; - } - if (matchDir == FORWARD_MATCH) { - indexOfMatch = htmlText.indexOf(findText, - lastSelectedOffset + 1); - } else { - indexOfMatch = htmlText.lastIndexOf(findText, - firstSelectedOffset - 1); - } - } while (indexOfMatch != -1 - && ((matchOptions & WHOLE_WORD_MATCH) == WHOLE_WORD_MATCH) - && isPartOfWord(htmlText, indexOfMatch, findText.length())); - if (indexOfMatch != -1) { - styledText.setSelectionRange(indexOfMatch, findText.length()); - styledText.showSelection(); - } else { - String selectedText = styledText.getSelectionText(); - if ((matchOptions & CASE_SENSITIVE_MATCH) == 0) { - selectedText = selectedText.toUpperCase(); - } - if (selectedText.equals(findText)) { - indexOfMatch = styledText.getSelectionRange().x; - } - } - return indexOfMatch; - - } - - protected int styledTextReplaceTextAndSelect(String replaceText) { - Point selectionOffset = styledText.getSelectionRange(); - styledText.replaceTextRange(selectionOffset.x, selectionOffset.y, - replaceText); - styledText.setSelectionRange(selectionOffset.x, replaceText.length()); - - return 1; - } - - protected void styledTextReplaceAll(String findText, String replaceText, - int matchOptions) { - styledText.setSelectionRange(0, 0); - while (styledTextFindTextAndSelect(findText, FORWARD_MATCH, - matchOptions) != -1) { - styledTextReplaceTextAndSelect(replaceText); - } - } - - protected boolean isWordChar(char c) { - if (Character.isLetterOrDigit(c)) - return true; - return false; - } - - protected boolean isPartOfWord(String text, int index, int length) { - if (index > 0) - if (isWordChar(text.charAt(index - 1))) - return true; - if (text.length() >= index + length) - if (isWordChar(text.charAt(index + length))) - return true; - return false; - } - - public IRichText getRichText() { - return richText; - } - - public void setRichText(IRichText richText) { - this.richText = richText; - } - - public void dispose() { - if (dialog != null) { - dialog.close(); - dialog = null; - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontNameAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontNameAction.java deleted file mode 100644 index 94de2201f6a..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontNameAction.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Sets the font name for the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class FontNameAction extends RichTextComboAction { - - /** - * Creates a new instance. - */ - public FontNameAction(final IRichText richText) { - super(richText); - setToolTipText(RichTextResources.fontNameAction_toolTipText); - // get system fonts - SortedSet fontSet = new TreeSet(); - FontData[] fonts = Display.getCurrent().getFontList(null, true); - for (int i = 0; i < fonts.length; i++) { - fontSet.add(((FontData) fonts[i]).getName()); - } - input = new ArrayList(); - input.add(RichTextResources.fontNameAction_DefaultFontName); - for (Iterator iter = fontSet.iterator(); iter.hasNext();) { - String fontName = iter.next(); - input.add(fontName); - } - - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - String fontName = richText.getSelected().getFontName(); - if (fontName - .equals(RichTextResources.fontNameAction_CSS_Default) - || fontName - .equals(RichTextResources.fontNameAction_CSS_Default_Mozilla) - || fontName.equals("default")) { //$NON-NLS-1$ - fontName = RichTextResources.fontNameAction_DefaultFontName; - } - int index = findFontNameInItems(fontName); - setNotifyListeners(false); - getCCombo().select(index); - setNotifyListeners(true); - } - }); - } - - private int findFontNameInItems(String fontName) { - int index = -1; - for (Iterator iter = input.iterator(); iter.hasNext();) { - String font = iter.next(); - index++; - if (font.equalsIgnoreCase(fontName)) { - return index; - } - } - return -1; - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public void execute(IRichText richText) { - if (richText != null) { - String selected = getCComboSelection(); - if (selected.equals(RichTextResources.fontNameAction_DefaultFontName)) { - richText.executeCommand(RichTextCommand.SET_FONT_NAME, ""); //$NON-NLS-1$ - } else { - richText.executeCommand(RichTextCommand.SET_FONT_NAME, selected); - } - } - } - - @Override - public Collection getInput() { - return input; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontSizeAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontSizeAction.java deleted file mode 100644 index f0629c017f4..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontSizeAction.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Sets the font size for the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class FontSizeAction extends RichTextComboAction { - - /** - * Creates a new instance. - */ - public FontSizeAction(final IRichText richText) { - super(richText); - setToolTipText(RichTextResources.fontSizeAction_toolTipText); - input = new ArrayList(); - - input.add("Default"); //$NON-NLS-1$ - input.add("1"); //$NON-NLS-1$ - input.add("2"); //$NON-NLS-1$ - input.add("3"); //$NON-NLS-1$ - input.add("4"); //$NON-NLS-1$ - input.add("5"); //$NON-NLS-1$ - input.add("6"); //$NON-NLS-1$ - input.add("7"); //$NON-NLS-1$ - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - // mozilla returns "default" if no size is applied - // IE returns 2 if no size is applied - String fontSize = richText.getSelected().getFontSize(); - int index = -1; - if (fontSize.equals("default")) { //$NON-NLS-1$ - index = 0; - } else { - try { - index = Integer.parseInt(fontSize); - } catch (NumberFormatException e) { - // leave index at -1 so nothing is selected - } - } - setNotifyListeners(false); - getCCombo().select(index); - setNotifyListeners(true); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public void execute(IRichText richText) { - if (richText != null) { - String selected = getCComboSelection(); - if ("Default".equals(selected)) { //$NON-NLS-1$ - richText.executeCommand(RichTextCommand.SET_FONT_SIZE, ""); //$NON-NLS-1$ - } else { - richText.executeCommand(RichTextCommand.SET_FONT_SIZE, - selected); - } - } - } - - @Override - public Collection getInput() { - return input; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontStyleAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontStyleAction.java deleted file mode 100644 index b0ed90fdc55..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/FontStyleAction.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.html.FontStyle; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Sets the font style for the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class FontStyleAction extends RichTextComboAction { - - /** - * Creates a new instance. - */ - public FontStyleAction(final IRichText richText) { - super(richText); - setToolTipText(RichTextResources.fontStyleAction_toolTipText); - - input = new ArrayList(); - input.add(FontStyle.NORMAL.getName()); - input.add(FontStyle.SECTION_HEADING.getName()); - input.add(FontStyle.SUBSECTION_HEADING.getName()); - input.add(FontStyle.SUB_SUBSECTION_HEADING.getName()); - input.add(FontStyle.QUOTE.getName()); - input.add(FontStyle.CODE_SAMPLE.getName()); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - String blockStyle = richText.getSelected().getBlockStyle(); - String name = FontStyle.getFontStyleName(blockStyle); - - int index = ((List)input).indexOf(name); - setNotifyListeners(false); - getCCombo().select(index); - setNotifyListeners(true); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public void execute(IRichText richText) { - if (richText != null) { - String selected = getCComboSelection(); - String value = FontStyle.getFontStyleValue(selected); - richText.executeCommand(RichTextCommand.SET_FONT_STYLE, value); - } - } - - @Override - public Collection getInput() { - return input; - } - - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IBaseRichTextAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IBaseRichTextAction.java deleted file mode 100644 index 0566ceef0d7..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IBaseRichTextAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -/** - * The base interface for a rich text action. - * - * @author Kelvin Low - * @since 1.0 - */ -public interface IBaseRichTextAction { - - /** - * Returns the tool tip for the action. - * - * @return the tool tip text - */ - public String getToolTipText(); - - /** - * Sets the tool tip for the action. - * - * @param toolTipText - * the tool tip text - */ - public void setToolTipText(String toolTipText); - - /** - * Returns the enabled status of the action. - * - * @return true if enabled, false if not - */ - public boolean getEnabled(); - - /** - * Enables or disables the action. - * - * @param enabled - * If true, enable the action. if - * false, disable it - */ - public void setEnabled(boolean enabled); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextAction.java deleted file mode 100644 index 572a2b640a0..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextAction.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.ToolItem; - -/** - * The interface for a rich text button action. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public interface IRichTextAction extends IBaseRichTextAction { - - /** - * Returns the image for the action. - * - * @return the image for the action - */ - public Image getImage(); - - /** - * Sets the image for the action. - * - * @param image - * the image for the action - */ - public void setImage(Image image); - - /** - * Returns the disabled image for the action. - * - * @return the disabled image for the action - */ - public Image getDisabledImage(); - - /** - * Sets the disabled image for the action. - * - * @param image - * the disabled image for the action - */ - public void setDisabledImage(Image image); - - /** - * Returns true if this action should be disabled when the - * rich text editor is in readonly mode. - */ - public boolean disableInReadOnlyMode(); - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode(); - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText); - - /** - * Sets the action's ToolItem - * @param toolItem - */ - public void setToolItem(ToolItem toolItem); - - /** - * Gets the SWT ToolItem Style to be used for this action - */ - public int getStyle(); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextComboAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextComboAction.java deleted file mode 100644 index baeaf167cc7..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IRichTextComboAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.common.ui.actions.CComboContributionItem; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.IStructuredContentProvider; - -/** - * The interface for a rich text combo action. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - * - * @deprecated unused - */ -public interface IRichTextComboAction extends IBaseRichTextAction { - -// /** -// * Adds an item. -// * -// * @param item -// * the item to be added -// */ -// public void addItem(String item); -// -// /** -// * Returns all items. -// * -// * @return an array of items -// */ -// public String[] getItems(); - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public void execute(IRichText richText, int index); - - public IStructuredContentProvider getContentProvider(); - - public ILabelProvider getLabelProvider(); - - public Object getInput(); - - /** - * Sets the action's ContributionItem - * - */ - public void setContributionItem(CComboContributionItem item); - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IndentAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IndentAction.java deleted file mode 100644 index 7bd985a7b13..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/IndentAction.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Indents the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class IndentAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public IndentAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_INDENT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_INDENT); - setToolTipText(RichTextResources.indentAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.INDENT); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ItalicAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ItalicAction.java deleted file mode 100644 index aae6fc1fe6d..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/ItalicAction.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Toggles the 'italic' attribute of the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class ItalicAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public ItalicAction(final IRichText richText) { - super(richText, IAction.AS_CHECK_BOX); - setImageDescriptor(RichTextImages.IMG_DESC_ITALIC); - setToolTipText(RichTextResources.italicAction_toolTipText); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - setChecked(richText.getSelected().isItalic()); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.ITALIC); - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyCenterAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyCenterAction.java deleted file mode 100644 index 74b6b86fbe6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyCenterAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Center justifies the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class JustifyCenterAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public JustifyCenterAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_CENTER); - setToolTipText(RichTextResources.justifyCenterAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.JUSTIFY_CENTER); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyFullAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyFullAction.java deleted file mode 100644 index ca1a4e06d4f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyFullAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Fully justifies the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class JustifyFullAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public JustifyFullAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_FULL); - setToolTipText(RichTextResources.justifyFullAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.JUSTIFY_FULL); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyLeftAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyLeftAction.java deleted file mode 100644 index 7da611fa759..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyLeftAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Left justifies the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class JustifyLeftAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public JustifyLeftAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_LEFT); - setToolTipText(RichTextResources.justifyLeftAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.JUSTIFY_LEFT); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyRightAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyRightAction.java deleted file mode 100644 index e53aba5e31e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/JustifyRightAction.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Right justifies the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class JustifyRightAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public JustifyRightAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_JUSTIFY_RIGHT); - setToolTipText(RichTextResources.justifyRightAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.JUSTIFY_RIGHT); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/OutdentAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/OutdentAction.java deleted file mode 100644 index a2c642a06c4..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/OutdentAction.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Indents the selected text in a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class OutdentAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public OutdentAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_OUTDENT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_OUTDENT); - setToolTipText(RichTextResources.outdentAction_toolTipText); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.OUTDENT); - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java deleted file mode 100644 index 7affed86025..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java +++ /dev/null @@ -1,247 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.io.File; -import java.net.URL; -import java.util.Stack; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.common.ui.util.ClipboardUtil; -import org.eclipse.epf.common.utils.FileUtil; -import org.eclipse.epf.common.utils.NetUtil; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.custom.StyledText; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.dnd.HTMLTransfer; -import org.eclipse.swt.widgets.Display; - -/** - * Pastes text from the clipboard onto a rich text control. - * - * @author Kelvin Low - * @since 1.0 - */ -public class PasteAction extends RichTextAction { - - private static final String SOURCE_URL = "SourceURL:"; //$NON-NLS-1$ - - private static final String HTM_EXT = ".htm"; //$NON-NLS-1$ - - private static final String HTML_EXT = ".html"; //$NON-NLS-1$ - - private static final Pattern HREF_REFERENCES = Pattern - .compile( - "href\\s*=\\s*\"(.*?)\"", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$ - - protected static final Pattern p_image_ref = Pattern - .compile( - "(<(img|iframe).*?src\\s*=\\s*\")(.*?)(\")", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); //$NON-NLS-1$ - - protected static String sourceURLStr = ""; //$NON-NLS-1$ - - private Logger logger; - - private static String RESOURCES = "resources"; //$NON-NLS-1$ - - /** - * Creates a new instance. - */ - public PasteAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_PASTE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_PASTE); - setToolTipText(RichTextResources.pasteAction_toolTipText); - logger = RichTextPlugin.getDefault().getLogger(); - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return false; - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - copyLinkResources(richText); - if (richText instanceof RichTextEditor - && ((RichTextEditor) richText).isHTMLTabSelected()) { - StyledText styledText = ((RichTextEditor) richText) - .getSourceEdit(); - styledText.paste(); - } else { - richText.executeCommand(RichTextCommand.PASTE, sourceURLStr); - } - } - } - - /** - * Copies the link resources. - * - * @param richText - * a rich text control - */ - protected void copyLinkResources(IRichText richText) { - try { - sourceURLStr = ClipboardUtil.getHTMLSourceURL(); - Clipboard clipboard = new Clipboard(Display.getCurrent()); - String html = (String) clipboard.getContents(HTMLTransfer - .getInstance()); - if (html != null && html.length() > 0) { - String basePath = richText.getBasePath(); - URL sourceURL = null; - if (sourceURLStr == null || sourceURLStr.length() == 0 - || sourceURLStr.equals("about:blank")) { //$NON-NLS-1$ - sourceURL = richText.getCopyURL(); - } else { - sourceURL = new URL(sourceURLStr); - } - - Matcher matcher = HREF_REFERENCES.matcher(html); - while (matcher.find()) { - String href = NetUtil.decodeURL(matcher.group(1)); - try { - URL hrefURL = new URL(sourceURL, href); - String scheme = hrefURL.getProtocol(); - if (scheme != null - && scheme - .equalsIgnoreCase(NetUtil.FILE_SCHEME)) { - String url = hrefURL.getPath(); - File srcFile = new File(NetUtil.decodeURL(url)); - File tgtFile = null; - File tgtDir = null; - if (href.startsWith("#") || sourceURL.sameFile(hrefURL)) { //$NON-NLS-1$ - continue; - } else if (href.startsWith(RESOURCES) || href.startsWith("./" + RESOURCES)) { //$NON-NLS-1$ - tgtFile = new File(basePath, href); - tgtDir = tgtFile.getParentFile(); - } else { - String resPath = getSubdirectoryOfResources(href); - tgtFile = new File(basePath + RESOURCES, resPath); - tgtDir = tgtFile; - } - tgtDir.mkdirs(); - FileUtil.copyFile(srcFile, tgtDir); - } - } catch (Exception e) { - logger.logError(e); - } - } - - matcher = p_image_ref.matcher(html); - while (matcher.find()) { - String src = NetUtil.decodeURL(matcher.group(3)); - try { - URL srcURL = new URL(sourceURL, src); - String scheme = srcURL.getProtocol(); - if (scheme != null - && scheme.equalsIgnoreCase(NetUtil.FILE_SCHEME)) { - File srcFile = null; - String authority = srcURL.getAuthority(); - if (authority != null) { - srcFile = new File(NetUtil.decodeURL(authority + srcURL.getPath())); - } else { - srcFile = new File(NetUtil.decodeURL(srcURL.getPath())); - } - File tgtFile = null; - File tgtDir = null; - if (src.startsWith(RESOURCES) || src.startsWith("./" + RESOURCES)) { //$NON-NLS-1$ - tgtFile = new File(basePath, src); - tgtDir = tgtFile.getParentFile(); - } else { - String resPath = getSubdirectoryOfResources(src); - tgtFile = new File(basePath + RESOURCES, resPath); - tgtDir = tgtFile; - } - tgtDir.mkdirs(); - FileUtil.copyFile(srcFile, tgtDir); - } - } catch (Exception e) { - logger.logError(e); - } - } - } - } catch (Exception e) { - logger.logError(e); - } - } - - /** - * Parses the given HTML content from the clipboard and returns the source - * URL. - * - * @param htmlContent - * the HTML content from the clipboard - * @return the source URL or null - */ - protected String getSourceURL(String htmlContent) { - String sourceURL = null; - int sourceURLIndex = htmlContent.indexOf(SOURCE_URL); - if (sourceURLIndex > 0) { - sourceURL = htmlContent.substring(sourceURLIndex - + SOURCE_URL.length()); - sourceURL = sourceURL.substring(0, sourceURL - .indexOf(FileUtil.LINE_SEP)); - if (sourceURL.toLowerCase().endsWith(HTM_EXT) - || sourceURL.toLowerCase().endsWith(HTML_EXT)) { - sourceURL = sourceURL.substring(0, sourceURL.indexOf(FileUtil - .getFileName(sourceURL)) - 1); - sourceURL = sourceURL.replace('\\', '/'); - } - sourceURL = FileUtil.appendSeparator(sourceURL, "/"); //$NON-NLS-1$ - } - return sourceURL; - } - - protected String getSubdirectoryOfResources(String path) { - String result = ""; //$NON-NLS-1$ - int res_idx = path.indexOf(RESOURCES); - if (res_idx != -1) { - Stack stack = new Stack(); - File relative = new File(path).getParentFile(); - while (!relative.getName().equals(RESOURCES)) { - stack.push(relative.getName()); - relative = relative.getParentFile(); - } - while (!stack.isEmpty()) { - result = result + (String)stack.pop() + File.separator; - } - } - return result; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PastePlainTextAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PastePlainTextAction.java deleted file mode 100644 index 3f797dc66c3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PastePlainTextAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.common.utils.StrUtil; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.widgets.Display; - -public class PastePlainTextAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public PastePlainTextAction(IRichText richText) { - super(richText, IAction.AS_PUSH_BUTTON); - setImageDescriptor(RichTextImages.IMG_DESC_PASTE_PLAIN_TEXT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_PASTE_PLAIN_TEXT); - setToolTipText(RichTextResources.pastePlainTextAction_toolTipText); - setEnabled(true); - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return false; - } - - public void execute(IRichText richText) { - if (richText != null) { - // get text from clipboard - Clipboard clipboard = new Clipboard(Display.getCurrent()); - String text = (String) clipboard.getContents(TextTransfer - .getInstance()); - if (text != null && text.length() > 0) { - text = StrUtil.convertNewlinesToHTML(text); - if (richText instanceof RichTextEditor) { - ((RichTextEditor)richText).addHTML(text); - } else { - richText.executeCommand(RichTextCommand.ADD_HTML, text); - } - } - } - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextAction.java deleted file mode 100644 index 3dfa39996ae..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextAction.java +++ /dev/null @@ -1,158 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashSet; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IContributionItem; -import org.eclipse.jface.action.IMenuCreator; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.ToolItem; - -/** - * The abstract implementation of a rich text action. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public abstract class RichTextAction extends Action { - - protected IRichText richText; - - protected ToolItem toolItem; - - protected Collection fMenuActions = new LinkedHashSet(); - - protected IMenuCreator menuCreator = new IMenuCreator() { - - private MenuManager dropDownMenuMgr; - - /** - * Creates the menu manager for the drop-down. - */ - private void createDropDownMenuMgr() { - if (dropDownMenuMgr == null) { - dropDownMenuMgr = new MenuManager(); - for (Iterator iter = getMenuActions().iterator();iter.hasNext();) { - IAction item = iter.next(); - dropDownMenuMgr.add(item); - } - } - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control) - */ - public Menu getMenu(Control parent) { - createDropDownMenuMgr(); - return dropDownMenuMgr.createContextMenu(parent); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu) - */ - public Menu getMenu(Menu parent) { - createDropDownMenuMgr(); - Menu menu = new Menu(parent); - IContributionItem[] items = dropDownMenuMgr.getItems(); - for (int i = 0; i < items.length; i++) { - IContributionItem item = items[i]; - IContributionItem newItem = item; - if (item instanceof ActionContributionItem) { - newItem = new ActionContributionItem( - ((ActionContributionItem) item).getAction()); - } - newItem.fill(menu, -1); - } - return menu; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#dispose() - */ - public void dispose() { - if (dropDownMenuMgr != null) { - dropDownMenuMgr.dispose(); - dropDownMenuMgr = null; - } - } - }; - - /** - * Creates a new instance. - * - * @param richText - * a rich text control - */ - public RichTextAction(IRichText richText, int style) { - super(null, style); - this.richText = richText; - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in readonly mode. - */ - public boolean disableInReadOnlyMode() { - return true; - } - - /** - * Returns true if this action should be disabled when the - * rich text editor is in source edit mode. - */ - public boolean disableInSourceMode() { - return true; - } - - public void setToolItem(ToolItem toolItem) { - this.toolItem = toolItem; - } - - @Override - public void run() { - execute(richText); - } - - @Override - public String getId() { - return getClass().getCanonicalName(); - } - - public Collection getMenuActions() { - return fMenuActions; - } - - public void addActionToMenu(IAction action) { - fMenuActions.add(action); - } - - public abstract void execute(IRichText richText); -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextComboAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextComboAction.java deleted file mode 100644 index d000ee26a3f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/RichTextComboAction.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.util.Collection; - -import org.eclipse.epf.common.ui.actions.CComboContributionItem; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.swt.SWT; - -/** - * The abstract implementation of a rich text combo action. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public abstract class RichTextComboAction extends CComboContributionItem { - - protected IRichText richText; - - protected String toolTipText; - - protected boolean enabled = true; - - protected boolean notifyListeners = false; - - - /** - * Creates a new instance. - * - * @param richText - * a rich text control - */ - public RichTextComboAction(IRichText richText) { - super(SWT.READ_ONLY | SWT.FLAT | SWT.BORDER); - this.richText = richText; - } - - /** - * Creates a new instance. - * - * @param richText - * a rich text control - */ - public RichTextComboAction(IRichText richText, int style) { - super(SWT.READ_ONLY | SWT.FLAT | SWT.BORDER | style); - this.richText = richText; - } - - - /** - * Executes the action. - * - * @param richText - * a rich text control - * @param index - * the index of the selected item - */ - public abstract void execute(IRichText richText); - - public abstract Collection getInput(); - - public void init() { - setInput(getInput()); - setNotifyListeners(true); - } - - protected String getCComboSelection() { - if (getCCombo() != null) { - int index = getSelectionIndex(); - return getCCombo().getItem(index); - } - return null; - } - - /** - * Returns the tool tip for the action. - * - * @return the tool tip text - */ - public String getToolTipText() { - return toolTipText; - } - - /** - * Sets the tool tip for the action. - * - * @param toolTipText - * the tool tip text - */ - public void setToolTipText(String toolTipText) { - this.toolTipText = toolTipText; - } - - /** - * Returns the enabled status of the action. - * - * @return true if enabled, false if not - */ - public boolean getEnabled() { - return enabled; - } - - /** - * Enables or disables the action. - * - * @param enabled - * if true, enable the action. if - * false, disable it. - */ - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - @Override - protected void performSelectionChanged() { - if (notifyListeners) { - execute(richText); - } - } - - public boolean isNotifyListeners() { - return notifyListeners; - } - - public void setNotifyListeners(boolean notifyListeners) { - this.notifyListeners = notifyListeners; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SubscriptAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SubscriptAction.java deleted file mode 100644 index 4dd42bf05c2..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SubscriptAction.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Toggles the subscript attribute of the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class SubscriptAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public SubscriptAction(final IRichText richText) { - super(richText, IAction.AS_CHECK_BOX); - setImageDescriptor(RichTextImages.IMG_DESC_SUBSCRIPT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_SUBSCRIPT); - setToolTipText(RichTextResources.subscriptAction_toolTipText); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - setChecked(richText.getSelected().isSubscript()); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.SUBSCRIPT); - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SuperscriptAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SuperscriptAction.java deleted file mode 100644 index d5a1a294c3a..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/SuperscriptAction.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Toggles the superscript attribute of the selected text in a rich text - * control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class SuperscriptAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public SuperscriptAction(final IRichText richText) { - super(richText, IAction.AS_CHECK_BOX); - setImageDescriptor(RichTextImages.IMG_DESC_SUPERSCRIPT); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_SUPERSCRIPT); - setToolTipText(RichTextResources.superscriptAction_toolTipText); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - setChecked(richText.getSelected().isSuperscript()); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.SUPERSCRIPT); - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyAction.java deleted file mode 100644 index 7ad78fb9190..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyAction.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import java.io.UnsupportedEncodingException; - -import org.eclipse.epf.common.CommonPlugin; -import org.eclipse.epf.common.IHTMLFormatter; -import org.eclipse.epf.common.utils.ExtensionHelper; -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextEditor; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.jface.action.IAction; - -/** - * Runs JTidy on the HTML - * - * @author Jeff Hardy - * @since 1.2 - */ -public class TidyAction extends RichTextAction { - - boolean forceOutput = false; - boolean makeBare = false; - boolean word2000 = false; - - // The HTML source formatter. - protected IHTMLFormatter htmlFormatter; - - - - /** - * Creates a new instance. - */ - public TidyAction(IRichText richText, boolean forceOutput, boolean makeBare, boolean word2000) { - super(richText, IAction.AS_PUSH_BUTTON); - this.forceOutput = forceOutput; - this.makeBare = makeBare; - this.word2000 = word2000; - setImageDescriptor(RichTextImages.IMG_DESC_TIDY); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_TIDY); -// htmlFormatter = new HTMLFormatter(); - htmlFormatter = (IHTMLFormatter) ExtensionHelper.createExtensionForJTidy( - CommonPlugin.getDefault().getId(), "htmlFormatter"); //$NON-NLS-1$ - } - - @Override - public void execute(IRichText richText) { - // get current text - String html; - if (richText instanceof RichTextEditor) { - html = ((RichTextEditor)richText).getText(); - } else { - html = richText.getText(); - } - // call JTidy with the options - try { - html = htmlFormatter.formatHTML(html, false, forceOutput, makeBare, word2000); - } catch (UnsupportedEncodingException e) { - RichTextPlugin.getDefault().getLogger().logError(e); - } - // set text - if (richText instanceof RichTextEditor) { - ((RichTextEditor)richText).setText(html); - } else { - richText.setText(html); - } - richText.checkModify(); - - } - - @Override - public boolean disableInSourceMode() { - return false; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyActionGroup.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyActionGroup.java deleted file mode 100644 index 0624bbdf76f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/TidyActionGroup.java +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; - -/** - * Runs JTidy on the HTML - * - * @author Jeff Hardy - * @since 1.2 - */ -public class TidyActionGroup extends RichTextAction { - - TidyAction tidyActionDefault; - TidyAction tidyActionCleanMS; - TidyAction tidyActionCleanWord2000; - - public TidyActionGroup(IRichText richText) { - super(richText, IAction.AS_DROP_DOWN_MENU); - // TODO need image - setImageDescriptor(RichTextImages.IMG_DESC_TIDY); - // TODO need image -// setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_PASTE); - setToolTipText(RichTextResources.tidy_clean_text); - - createActions(); - setMenuCreator(menuCreator); - } - - private void createActions() { - tidyActionDefault = new TidyAction(richText, true, false, false); - tidyActionDefault.setText(RichTextResources.tidy_clean_text); - tidyActionDefault.setToolTipText(RichTextResources.tidy_clean_toolTipText); - tidyActionCleanMS = new TidyAction(richText, true, true, false); - tidyActionCleanMS.setText(RichTextResources.tidy_cleaner_text); - tidyActionCleanMS.setToolTipText(RichTextResources.tidy_cleaner_toolTipText); - tidyActionCleanWord2000 = new TidyAction(richText, true, true, true); - tidyActionCleanWord2000.setText(RichTextResources.tidy_cleanest_text); - tidyActionCleanWord2000.setToolTipText(RichTextResources.tidy_cleanest_toolTipText); - addActionToMenu(tidyActionDefault); - addActionToMenu(tidyActionCleanMS); - addActionToMenu(tidyActionCleanWord2000); - } - - @Override - public void execute(IRichText richText) { - // TODO Auto-generated method stub - - // call normal clean - tidyActionDefault.execute(richText); - - } - - @Override - public boolean disableInSourceMode() { - return false; - } - - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/UnderlineAction.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/UnderlineAction.java deleted file mode 100644 index 27825aca080..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/UnderlineAction.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.actions; - -import org.eclipse.epf.richtext.IRichText; -import org.eclipse.epf.richtext.RichTextCommand; -import org.eclipse.epf.richtext.RichTextImages; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -/** - * Toggles the underline attribute of the selected text in a rich text control. - * - * @author Kelvin Low - * @author Jeff Hardy - * @since 1.0 - */ -public class UnderlineAction extends RichTextAction { - - /** - * Creates a new instance. - */ - public UnderlineAction(final IRichText richText) { - super(richText, IAction.AS_CHECK_BOX); - setImageDescriptor(RichTextImages.IMG_DESC_UNDERLINE); - setDisabledImageDescriptor(RichTextImages.DISABLED_IMG_DESC_UNDERLINE); - setToolTipText(RichTextResources.underlineAction_toolTipText); - // add listener - richText.addListener(SWT.SELECTED, new Listener() { - public void handleEvent(Event event) { - setChecked(richText.getSelected().isUnderLine()); - } - }); - } - - /** - * Executes the action. - * - * @param richText - * a rich text control - */ - public void execute(IRichText richText) { - if (richText != null) { - richText.executeCommand(RichTextCommand.UNDERLINE); - } - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/package.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/package.html deleted file mode 100644 index 8e923674e79..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides editing actions for the rich text control and editor. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddCodeDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddCodeDialog.java deleted file mode 100644 index 982efb716c3..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddCodeDialog.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* -* Licensed Materials - Property of IBM -* (c) Copyright IBM Corporation 2007,2011. All Rights Reserved. -* -* Note to U.S. Government Users Restricted Rights: -* Use, duplication or disclosure restricted by GSA ADP Schedule -* Contract with IBM Corp. -*******************************************************************************/ - -package org.eclipse.epf.richtext.dialogs; - -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -public class AddCodeDialog extends BaseDialog { - private Text html; - private String htmlStr; - - public AddCodeDialog(Shell parent) { - super(parent); - } - - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - - Label label = new Label(composite, SWT.NONE); - label.setText(RichTextResources.addCodeDialog_Msg); - { - GridData gd = new GridData(GridData.FILL_HORIZONTAL); - gd.horizontalSpan = 2; - label.setLayoutData(gd); - } - - html = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); - { - GridData gd = new GridData(GridData.FILL_BOTH); - gd.horizontalSpan = 2; - gd.widthHint = 300; - gd.heightHint = 200; - html.setLayoutData(gd); - } - html.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - okButton.setEnabled(html.getText().trim().length() > 0); - } - }); - - super.getShell().setText(RichTextResources.addCodeDialog_title); - - return composite; - } - - protected void createButtonsForButtonBar(Composite parent) { - super.createButtonsForButtonBar(parent); - okButton.setEnabled(false); - } - - protected void okPressed() { - //add the extra "
    " to avoid Jtidy problem - String br = "
    "; //$NON-NLS-1$ - String customHtml = html.getText().trim(); - htmlStr = br + customHtml; - - super.okPressed(); - } - - public String getCode() { - return htmlStr; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddImageDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddImageDialog.java deleted file mode 100644 index 2d2ec28b782..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddImageDialog.java +++ /dev/null @@ -1,143 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.dialogs; - -import java.io.File; - -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.html.Image; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Prompts the user to specify the image that will be used to create a HTML - * <image> tag in the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddImageDialog extends BaseDialog { - - protected Image image = new Image(); - - protected Text urlText; - - protected Button browseButton; - - protected SelectionAdapter browseSelectionAdapter = new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - FileDialog dialog = new FileDialog(Display.getCurrent() - .getActiveShell(), SWT.OPEN); - dialog - .setFilterExtensions(new String[] { - "*.gif", "*.jpg", "*.bmp" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - String imageFile = dialog.open(); - if (imageFile != null && imageFile.length() > 0) { - File file = new File(imageFile); - try { - String url = file.toURL().toExternalForm(); - urlText.setText(url); - } catch (Exception e) { - logger.logError(e); - } - } - } - }; - - protected ModifyListener urlTextListener = new ModifyListener() { - public void modifyText(ModifyEvent e) { - if (okButton != null) { - okButton.setEnabled(urlText.getText().trim().length() > 0); - } - } - }; - - /** - * Creates a new instance. - * - * @param parent - * the parent shell - */ - public AddImageDialog(Shell parent) { - super(parent); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - GridLayout layout = (GridLayout) composite.getLayout(); - layout.numColumns = 3; - - Label urlLabel = new Label(composite, SWT.NONE); - urlLabel.setText(RichTextResources.urlLabel_text); - urlText = new Text(composite, SWT.BORDER); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.widthHint = 300; - urlText.setLayoutData(gridData); - urlText.addModifyListener(urlTextListener); - - browseButton = new Button(composite, SWT.NONE); - browseButton.setText(RichTextResources.browseButton_text); - browseButton.addSelectionListener(browseSelectionAdapter); - - super.getShell().setText(RichTextResources.addImageDialog_title); - - return composite; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - super.createButtonsForButtonBar(parent); - okButton.setEnabled(false); - } - - @Override - protected void okPressed() { - String url = urlText.getText(); - if (url != null && url.length() > 0) { - image.setURL(url); - } - super.okPressed(); - } - - /** - * Gets the user specified image. - * - * @return an Image object - */ - public Image getImage() { - return image; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddLinkDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddLinkDialog.java deleted file mode 100644 index 5a78077f933..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddLinkDialog.java +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.dialogs; - -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.html.Link; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Prompts the user to specify the file that will be used to create a HTML - * <a> tag in the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddLinkDialog extends BaseDialog { - - protected Link link = new Link(); - - protected Text urlText; - - protected String basePath; - - protected Composite composite; - - protected Label urlLabel; - - protected Text urlDisplayNameText; - - protected Label urlDisplayNameLabel; - - protected ModifyListener urlTextModifyListener = new ModifyListener() { - public void modifyText(ModifyEvent e) { - if (okButton != null) { - okButton.setEnabled(urlText.getText().trim().length() > 0); - } - } - }; - - /** - * Creates a new instance. - * - * @param parent - * the parent shell - */ - public AddLinkDialog(Shell parent, String basePath) { - super(parent); - this.basePath = basePath; - } - - @Override - protected Control createDialogArea(Composite parent) { - composite = (Composite) super.createDialogArea(parent); - - urlLabel = new Label(composite, SWT.NONE); - urlLabel.setText(RichTextResources.urlLabel_text); - urlText = new Text(composite, SWT.BORDER); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.widthHint = 300; - urlText.setLayoutData(gridData); - urlText.addModifyListener(urlTextModifyListener); - - urlDisplayNameLabel = new Label(composite, SWT.NONE); - urlDisplayNameLabel.setText(RichTextResources.urlDisplayNameLabel_text); - urlDisplayNameText = new Text(composite, SWT.BORDER); - GridData gridData2 = new GridData(GridData.FILL_HORIZONTAL); - gridData2.widthHint = 300; - urlDisplayNameText.setLayoutData(gridData2); - - super.getShell().setText(RichTextResources.addLinkDialog_title); - - return composite; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - super.createButtonsForButtonBar(parent); - okButton.setEnabled(false); - } - - @Override - protected void okPressed() { - String url = urlText.getText(); - if (url != null && url.length() > 0) { - link.setURL(url); - link.setName(urlDisplayNameText.getText()); - } - super.okPressed(); - } - - /** - * Gets the user specified link. - * - * @return an Link object - */ - public Link getLink() { - return link; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddTableDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddTableDialog.java deleted file mode 100644 index 27832d5527b..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/AddTableDialog.java +++ /dev/null @@ -1,220 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.dialogs; - -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.html.Table; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Prompts the user to specify the attributes that will be used to create a HTML - * <table> tag in the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class AddTableDialog extends BaseDialog { - - private static final int DEFAULT_ROWS = 2; - - private static final int DEFAULT_COLUMNS = 2; - - private static final String DEFAULT_WIDTH = "85%"; //$NON-NLS-1$ - - private static final String[] TABLE_STYLE_LABELS = { - RichTextResources.tableHeaderNone_text, - RichTextResources.tableHeaderCols_text, - RichTextResources.tableHeaderRows_text, - RichTextResources.tableHeaderBoth_text, }; - - private Table table = new Table(); - - private Text rowsText; - - private Text colsText; - - private Text widthText; - - private Combo tableTypeCombo; - - private Text summaryText; - - private Text captionText; - - private ModifyListener modifyListener = new ModifyListener() { - public void modifyText(ModifyEvent event) { - if (okButton != null) { - try { - int rows = Integer.parseInt(rowsText.getText().trim()); - int cols = Integer.parseInt(colsText.getText().trim()); - String width = widthText.getText().trim(); - okButton.setEnabled(rows > 0 && cols > 0 - && width.length() > 0); - } catch (Exception e) { - okButton.setEnabled(false); - } - } - } - }; - - /** - * Creates a new instance. - * - * @param parent - * the parent shell - */ - public AddTableDialog(Shell parent) { - super(parent); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - - Label rowsLabel = new Label(composite, SWT.NONE); - rowsLabel.setText(RichTextResources.rowsLabel_text); - - rowsText = new Text(composite, SWT.BORDER); - rowsText.setTextLimit(2); - rowsText.setText("" + DEFAULT_ROWS); //$NON-NLS-1$ - { - GridData gridData = new GridData(GridData.FILL_HORIZONTAL - | GridData.GRAB_HORIZONTAL); - rowsText.setLayoutData(gridData); - } - rowsText.addModifyListener(modifyListener); - - Label colsLabel = new Label(composite, SWT.NONE); - colsLabel.setText(RichTextResources.columnsLabel_text); - - colsText = new Text(composite, SWT.BORDER); - colsText.setTextLimit(2); - colsText.setText("" + DEFAULT_COLUMNS); //$NON-NLS-1$ - { - GridData gridData = new GridData(GridData.FILL_HORIZONTAL - | GridData.GRAB_HORIZONTAL); - colsText.setLayoutData(gridData); - } - colsText.addModifyListener(modifyListener); - - Label widthLabel = new Label(composite, SWT.NONE); - widthLabel.setText(RichTextResources.widthLabel_text); - - widthText = new Text(composite, SWT.BORDER); - widthText.setText("" + DEFAULT_WIDTH); //$NON-NLS-1$ - { - GridData gridData = new GridData(GridData.FILL_HORIZONTAL - | GridData.GRAB_HORIZONTAL); - widthText.setLayoutData(gridData); - } - widthText.addModifyListener(modifyListener); - - Label headerTypeLabel = new Label(composite, SWT.NONE); - headerTypeLabel.setText(RichTextResources.tableStyleLabel_text); - - tableTypeCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY); - tableTypeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - tableTypeCombo.setItems(TABLE_STYLE_LABELS); - tableTypeCombo.setText(TABLE_STYLE_LABELS[0]); - - Label summaryLabel = new Label(composite, SWT.NONE); - summaryLabel.setText(RichTextResources.summaryLabel_text); - summaryText = new Text(composite, SWT.BORDER); - { - GridData gridData = new GridData(GridData.FILL_HORIZONTAL - | GridData.GRAB_HORIZONTAL); - summaryText.setLayoutData(gridData); - } - - Label captionLabel = new Label(composite, SWT.NONE); - captionLabel.setText(RichTextResources.captionLabel_text); - captionText = new Text(composite, SWT.BORDER); - { - GridData gridData = new GridData(GridData.FILL_HORIZONTAL - | GridData.GRAB_HORIZONTAL); - captionText.setLayoutData(gridData); - } - - super.getShell().setText(RichTextResources.addTableDialog_title); - - return composite; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - super.createButtonsForButtonBar(parent); - } - - @Override - protected void okPressed() { - String rowsValue = rowsText.getText(); - if (rowsValue != null && rowsValue.length() > 0) { - try { - int rows = Integer.parseInt(rowsValue); - table.setRows(rows); - } catch (Exception e) { - table.setRows(DEFAULT_ROWS); - } - } - - String colsValue = colsText.getText(); - if (colsValue != null && colsValue.length() > 0) { - try { - int cols = Integer.parseInt(colsValue); - table.setColumns(cols); - } catch (Exception e) { - table.setColumns(DEFAULT_COLUMNS); - } - } - - String widthValue = widthText.getText(); - if (widthValue != null && widthValue.length() > 0) { - table.setWidth(widthValue); - } else { - table.setWidth(DEFAULT_WIDTH); - } - - table.setSummary(summaryText.getText().trim()); - table.setCaption(captionText.getText().trim()); - table.setTableHeaders(tableTypeCombo.getSelectionIndex()); - - super.okPressed(); - } - - /** - * Gets the user specified table. - * - * @return an Table object - */ - public Table getTable() { - return table; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/BaseDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/BaseDialog.java deleted file mode 100644 index ad92d9f2255..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/BaseDialog.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.dialogs; - -import org.eclipse.epf.common.serviceability.Logger; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; - -/** - * The base class for all dialogs used by the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class BaseDialog extends Dialog { - - // A logger for logging runtime warnings and errors. - protected Logger logger; - - // The OK button. - protected Button okButton; - - // The Cancel button. - protected Button cancelButton; - - /** - * Creates a new instance. - * - * @param parent - * the parent shell - */ - public BaseDialog(Shell parent) { - super(parent); - logger = RichTextPlugin.getDefault().getLogger(); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - GridLayout layout = (GridLayout) composite.getLayout(); - layout.marginWidth = 10; - layout.marginHeight = 10; - layout.numColumns = 2; - GridData gridData = (GridData) composite.getLayoutData(); - gridData.verticalIndent = 10; - return composite; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - // Create the OK button. - createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, - true); - - // Create the Cancel button. - createButton(parent, IDialogConstants.CANCEL_ID, - IDialogConstants.CANCEL_LABEL, false); - - // Set help context for the OK button. - okButton = super.getButton(IDialogConstants.OK_ID); - - // Set help context for the Cancel button. - cancelButton = super.getButton(IDialogConstants.CANCEL_ID); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/FindReplaceDialog.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/FindReplaceDialog.java deleted file mode 100644 index c03c6d75e3e..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/FindReplaceDialog.java +++ /dev/null @@ -1,337 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.dialogs; - -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.epf.richtext.actions.FindReplaceAction; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Prompts the user to specify the search and replace strings and options. - * - * @author Kelvin Low - * @since 1.0 - */ -public class FindReplaceDialog extends BaseDialog { - - private FindReplaceAction findReplaceAction; - - private boolean findOnly; - - private Text findText; - - private Text replaceText; - - private Button searchForwardRadioButton; - - private Button searchBackwardRadioButton; - - private Button caseSensitiveCheckbox; - - private Button wholeWordCheckbox; - - private Button findButton; - - private Button replaceButton; - - private Button replaceFindButton; - - private Button replaceAllButton; - - private Label statusLabel; - - /** - * Creates a new instance. - * - * @param parent - * the parent shell - * @param findReplaceAction - * the Find and Replace action - * @param findOnly - * if true, disable the replace and replace all - * functionalities - */ - public FindReplaceDialog(Shell parent, FindReplaceAction findReplaceAction, - boolean findOnly) { - super(parent); - setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | getDefaultOrientation()); - setBlockOnOpen(false); - this.findReplaceAction = findReplaceAction; - this.findOnly = findOnly; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - GridLayout layout = (GridLayout) composite.getLayout(); - layout.numColumns = 1; - - Composite textComposite = new Composite(composite, SWT.NONE); - textComposite.setLayout(new GridLayout(2, false)); - textComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label findLabel = new Label(textComposite, SWT.NONE); - findLabel.setText(RichTextResources.findLabel_text); - findText = new Text(textComposite, SWT.BORDER); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.widthHint = 200; - findText.setLayoutData(gridData); - findText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - if (findButton != null) { - findButton - .setEnabled(findText.getText().trim().length() > 0); - } - if (replaceAllButton != null && !findOnly) { - replaceAllButton.setEnabled(findText.getText().trim() - .length() > 0); - } - } - }); - - Label replaceLabel = new Label(textComposite, SWT.NONE); - replaceLabel.setText(RichTextResources.replaceLabel_text); - replaceText = new Text(textComposite, SWT.BORDER); - replaceText.setLayoutData(gridData); - if (findOnly) { - replaceText.setEnabled(false); - } else { - replaceText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - if (replaceButton != null) { - replaceButton.setEnabled(findReplaceAction - .getFoundMatch()); - } - if (replaceFindButton != null) { - replaceFindButton.setEnabled(findReplaceAction - .getFoundMatch()); - } - } - }); - } - - Composite optionsComposite = new Composite(composite, SWT.NONE); - optionsComposite.setLayout(new GridLayout(2, true)); - optionsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Group directionGroup = new Group(optionsComposite, SWT.NONE); - directionGroup.setText(RichTextResources.directionGroup_text); - directionGroup.setLayout(new GridLayout(1, false)); - directionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - searchForwardRadioButton = new Button(directionGroup, SWT.RADIO); - searchForwardRadioButton - .setText(RichTextResources.forwardRadioButton_text); - searchForwardRadioButton.setSelection(true); - searchBackwardRadioButton = new Button(directionGroup, SWT.RADIO); - searchBackwardRadioButton - .setText(RichTextResources.backwardRadioButton_text); - - Group optionsGroup = new Group(optionsComposite, SWT.NONE); - optionsGroup.setText(RichTextResources.optionsGroup_text); - optionsGroup.setLayout(new GridLayout(1, false)); - optionsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - caseSensitiveCheckbox = new Button(optionsGroup, SWT.CHECK); - caseSensitiveCheckbox - .setText(RichTextResources.caseSensitiveCheckbox_text); - wholeWordCheckbox = new Button(optionsGroup, SWT.CHECK); - wholeWordCheckbox.setText(RichTextResources.wholeWordCheckbox_text); - - statusLabel = new Label(composite, SWT.NONE); - statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - super.getShell().setText(RichTextResources.findReplaceDialog_title); - - return composite; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - createButton(parent, IDialogConstants.CLIENT_ID + 1, - RichTextResources.findButton_text, true); - findButton = super.getButton(IDialogConstants.CLIENT_ID + 1); - findButton.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent event) { - findReplaceAction.run(FindReplaceAction.FIND_TEXT, - getFindText(), getReplaceText(), getMatchDirection(), - getMatchOptions()); - if (!findOnly) { - replaceButton.setEnabled(findReplaceAction.getFoundMatch()); - replaceFindButton.setEnabled(findReplaceAction - .getFoundMatch()); - } - if (findReplaceAction.getFoundMatch()) { - statusLabel.setText(""); //$NON-NLS-1$ - } else { - statusLabel - .setText(RichTextResources.FindReplace_Status_noMatch_label); - } - findButton.setFocus(); - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - - createButton(parent, IDialogConstants.CLIENT_ID + 2, - RichTextResources.replaceButton_text, false); - replaceButton = super.getButton(IDialogConstants.CLIENT_ID + 2); - if (!findOnly) { - replaceButton.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent event) { - findReplaceAction.run(FindReplaceAction.REPLACE_TEXT, - getFindText(), getReplaceText(), - getMatchDirection(), getMatchOptions()); - replaceButton.setFocus(); - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - } - - createButton(parent, IDialogConstants.CLIENT_ID + 3, - RichTextResources.replaceFindButton_text, false); - replaceFindButton = super.getButton(IDialogConstants.CLIENT_ID + 3); - if (!findOnly) { - replaceFindButton.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent event) { - findReplaceAction.run(FindReplaceAction.REPLACE_FIND_TEXT, - getFindText(), getReplaceText(), - getMatchDirection(), getMatchOptions()); - replaceButton.setEnabled(findReplaceAction.getFoundMatch()); - replaceFindButton.setEnabled(findReplaceAction - .getFoundMatch()); - replaceFindButton.setFocus(); - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - } - - createButton(parent, IDialogConstants.CLIENT_ID + 4, - RichTextResources.replaceallButton_text, false); - replaceAllButton = super.getButton(IDialogConstants.CLIENT_ID + 4); - if (!findOnly) { - replaceAllButton.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent event) { - findReplaceAction.run(FindReplaceAction.REPLACE_ALL_TEXT, - getFindText(), getReplaceText(), - getMatchDirection(), getMatchOptions()); - replaceButton.setEnabled(false); - replaceFindButton.setEnabled(false); - replaceAllButton.setFocus(); - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - } - - // Create the Cancel button. - createButton(parent, IDialogConstants.CANCEL_ID, - IDialogConstants.CANCEL_LABEL, false); - cancelButton = super.getButton(IDialogConstants.CANCEL_ID); - - findButton.setEnabled(false); - replaceButton.setEnabled(false); - replaceFindButton.setEnabled(false); - replaceAllButton.setEnabled(false); - } - - /** - * Gets the user specified find text. - * - * @return the find text - */ - public String getFindText() { - return findText.getText(); - } - - /** - * Gets the user specified replace text. - * - * @return the replace text - */ - public String getReplaceText() { - return replaceText.getText(); - } - - /** - * Gets the text match direction. - * - * @return FIND_FORWARD or FIND_BACKWARD - */ - public int getMatchDirection() { - return searchForwardRadioButton.getSelection() ? FindReplaceAction.FORWARD_MATCH - : FindReplaceAction.BACKWARD_MATCH; - } - - /** - * Gets the text match options. - * - * @return the text match options - */ - public int getMatchOptions() { - int options = 0; - if (wholeWordCheckbox.getSelection() == true) { - options |= FindReplaceAction.WHOLE_WORD_MATCH; - } - if (caseSensitiveCheckbox.getSelection() == true) { - options |= FindReplaceAction.CASE_SENSITIVE_MATCH; - } - return options; - } - - /** - * Checks the find only option. - * - * @return true if find only option is enabled - */ - public boolean isFindOnly() { - return findOnly; - } - - /** - * Sets the find only option. - * - * @param findOnly, - * if true, enable the find only option - */ - public void setFindOnly(boolean findOnly) { - this.findOnly = findOnly; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/package.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/package.html deleted file mode 100644 index f2a46edb8e6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/dialogs/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides editing dialogs for the rich text control and editor. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/BlockTag.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/BlockTag.java deleted file mode 100644 index 57c8433a6a6..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/BlockTag.java +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.html; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.epf.richtext.RichTextResources; - -/** - * Models a HTML block tag. - * - * @author Kelvin Low - * @since 1.0 - */ -public class BlockTag { - - // The user friendly names. - private static final String NAME_PARAGRAPH = RichTextResources.blockTag_paragraph; - - private static final String NAME_HEADING_1 = RichTextResources.blockTag_heading1; - - private static final String NAME_HEADING_2 = RichTextResources.blockTag_heading2; - - private static final String NAME_HEADING_3 = RichTextResources.blockTag_heading3; - - private static final String NAME_HEADING_4 = RichTextResources.blockTag_heading4; - - private static final String NAME_HEADING_5 = RichTextResources.blockTag_heading5; - - private static final String NAME_HEADING_6 = RichTextResources.blockTag_heading6; - - private static final String NAME_ADDRESS = RichTextResources.blockTag_address; - - private static final String NAME_PREFORMATTED_TEXT = RichTextResources.blockTag_preformattedText; - - // The internal values. - private static final String VALUE_PARAGRAPH = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_1 = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_2 = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_3 = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_4 = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_5 = "

    "; //$NON-NLS-1$ - - private static final String VALUE_HEADING_6 = "
    "; //$NON-NLS-1$ - - private static final String VALUE_ADDRESS = "
    "; //$NON-NLS-1$ - - private static final String VALUE_PREFORMATTED_TEXT = "
    "; //$NON-NLS-1$
    -
    -	/**
    -	 * The <p> tag.
    -	 */
    -	static public final BlockTag PARAGRAPH = new BlockTag(NAME_PARAGRAPH,
    -			VALUE_PARAGRAPH);
    -
    -	/**
    -	 * <h1> tag.
    -	 */
    -	static public final BlockTag HEADING_1 = new BlockTag(NAME_HEADING_1,
    -			VALUE_HEADING_1);
    -
    -	/**
    -	 * <h2> tag.
    -	 */
    -	static public final BlockTag HEADING_2 = new BlockTag(NAME_HEADING_2,
    -			VALUE_HEADING_2);
    -
    -	/**
    -	 * <h3> tag.
    -	 */
    -	static public final BlockTag HEADING_3 = new BlockTag(NAME_HEADING_3,
    -			VALUE_HEADING_3);
    -
    -	/**
    -	 * <h4> tag.
    -	 */
    -	static public final BlockTag HEADING_4 = new BlockTag(NAME_HEADING_4,
    -			VALUE_HEADING_4);
    -
    -	/**
    -	 * <h5> tag.
    -	 */
    -	static public final BlockTag HEADING_5 = new BlockTag(NAME_HEADING_5,
    -			VALUE_HEADING_5);
    -
    -	/**
    -	 * <h6> tag.
    -	 */
    -	static public final BlockTag HEADING_6 = new BlockTag(NAME_HEADING_6,
    -			VALUE_HEADING_6);
    -
    -	/**
    -	 * <address> tag.
    -	 */
    -	static public final BlockTag ADDRESS = new BlockTag(NAME_ADDRESS,
    -			VALUE_ADDRESS);
    -
    -	/**
    -	 * <pre> tag.
    -	 */
    -	static public final BlockTag PREFORMATTED_TEXT = new BlockTag(
    -			NAME_PREFORMATTED_TEXT, VALUE_PREFORMATTED_TEXT);
    -
    -	// A list of BlockTag objects.
    -	static private final List BLOCK_TAGS = new ArrayList();
    -	static {
    -		BLOCK_TAGS.add(PARAGRAPH);
    -		BLOCK_TAGS.add(HEADING_1);
    -		BLOCK_TAGS.add(HEADING_2);
    -		BLOCK_TAGS.add(HEADING_3);
    -		BLOCK_TAGS.add(HEADING_4);
    -		BLOCK_TAGS.add(HEADING_5);
    -		BLOCK_TAGS.add(HEADING_6);
    -		BLOCK_TAGS.add(ADDRESS);
    -		BLOCK_TAGS.add(PREFORMATTED_TEXT);
    -	}
    -
    -	// The block tag name.
    -	private String name;
    -
    -	// The block tag value.
    -	private String value;
    -
    -	/**
    -	 * Creates a new instance.
    -	 * 
    -	 * @param name
    -	 *            the block tag name
    -	 * @param value
    -	 *            the block tag value
    -	 */
    -	public BlockTag(String name, String value) {
    -		this.name = name;
    -		this.value = value;
    -	}
    -
    -	/**
    -	 * Gets the block tag name.
    -	 * 
    -	 * @return the block tag name
    -	 */
    -	public String getName() {
    -		return name;
    -	}
    -
    -	/**
    -	 * Gets the block tag value.
    -	 * 
    -	 * @return the block tag value
    -	 */
    -	public String getValue() {
    -		return value;
    -	}
    -
    -	/**
    -	 * Gets the BlockTag object that is mapped to the given
    -	 * index.
    -	 * 
    -	 * @param index
    -	 *            an index into the BlockTag list
    -	 * @return a BlockTag object
    -	 */
    -	public static BlockTag getBlockTag(int index) {
    -		BlockTag result = (BlockTag) BLOCK_TAGS.get(index);
    -		if (result != null) {
    -			return result;
    -		}
    -		return PARAGRAPH;
    -	}
    -
    -}
    \ No newline at end of file
    diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontName.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontName.java
    deleted file mode 100644
    index 48714736f1e..00000000000
    --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontName.java
    +++ /dev/null
    @@ -1,150 +0,0 @@
    -/*******************************************************************************
    - * Copyright (c) 2009 IBM Corporation 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
    - * http://www.eclipse.org/legal/epl-v10.html
    - *
    - * Contributors:
    - *     IBM Corporation - initial API and implementation
    - *******************************************************************************/
    -//------------------------------------------------------------------------------
    -// Copyright (c) 2005, 2007 IBM Corporation 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
    -// http://www.eclipse.org/legal/epl-v10.html
    -//
    -// Contributors:
    -// IBM Corporation - initial implementation
    -//------------------------------------------------------------------------------
    -package org.eclipse.epf.richtext.html;
    -
    -import java.util.ArrayList;
    -import java.util.List;
    -
    -import org.eclipse.epf.richtext.RichTextResources;
    -
    -/**
    - * Models a HTML font name.
    - * 
    - * @author Kelvin Low
    - * @since 1.0
    - */
    -public class FontName {
    -
    -	// The user friendly names.
    -	private static final String NAME_DEFAULT = RichTextResources.fontName_default;
    -
    -	private static final String NAME_ARIAL = RichTextResources.fontName_arial;
    -
    -	private static final String NAME_COURIER_NEW = RichTextResources.fontName_courierNew;
    -
    -	private static final String NAME_TIMES_NEW_ROMAN = RichTextResources.fontName_timesNewRoman;
    -
    -	private static final String NAME_VERDANA = RichTextResources.fontName_verdana;
    -
    -	// The internal values.
    -	private static final String VALUE_DEFAULT = ""; //$NON-NLS-1$
    -
    -	private static final String VALUE_ARIAL = "Arial, Helvetica, sans-serif"; //$NON-NLS-1$
    -
    -	private static final String VALUE_COURIER_NEW = "Courier New, Courier, mono"; //$NON-NLS-1$
    -
    -	private static final String VALUE_TIMES_NEW_ROMAN = "Times New Roman, Times, serif"; //$NON-NLS-1$
    -
    -	private static final String VALUE_VERDANA = "Verdana, Arial, Helvetica, sans-serif"; //$NON-NLS-1$
    -
    -	/**
    -	 * Default font.
    -	 */
    -	static public final FontName DEFAULT = new FontName(NAME_DEFAULT,
    -			VALUE_DEFAULT);
    -
    -	/**
    -	 * Arial font.
    -	 */
    -	static public final FontName ARIAL = new FontName(NAME_ARIAL, VALUE_ARIAL);
    -
    -	/**
    -	 * Courier New font.
    -	 */
    -	static public final FontName COURIER_NEW = new FontName(NAME_COURIER_NEW,
    -			VALUE_COURIER_NEW);
    -
    -	/**
    -	 * Times New Roman font.
    -	 */
    -	static public final FontName TIMES_NEW_ROMAN = new FontName(
    -			NAME_TIMES_NEW_ROMAN, VALUE_TIMES_NEW_ROMAN);
    -
    -	/**
    -	 * Verdana font.
    -	 */
    -	static public final FontName VERDANA = new FontName(NAME_VERDANA,
    -			VALUE_VERDANA);
    -
    -	// A list of FontName objects.
    -	static private final List FONT_NAMES = new ArrayList();
    -	static {
    -		FONT_NAMES.add(DEFAULT);
    -		FONT_NAMES.add(ARIAL);
    -		FONT_NAMES.add(COURIER_NEW);
    -		FONT_NAMES.add(TIMES_NEW_ROMAN);
    -		FONT_NAMES.add(VERDANA);
    -	}
    -
    -	// The font name.
    -	private String name;
    -
    -	// The font value.
    -	private String value;
    -
    -	/**
    -	 * Creates a new instance.
    -	 * 
    -	 * @param name
    -	 *            the font name
    -	 * @param value
    -	 *            the font value
    -	 */
    -	public FontName(String name, String value) {
    -		this.name = name;
    -		this.value = value;
    -	}
    -
    -	/**
    -	 * Gets the font name.
    -	 * 
    -	 * @return the font name
    -	 */
    -	public String getName() {
    -		return name;
    -	}
    -
    -	/**
    -	 * Gets the font value.
    -	 * 
    -	 * @return the font value
    -	 */
    -	public String getValue() {
    -		return value;
    -	}
    -
    -	/**
    -	 * Gets the FontName object that is mapped to the given
    -	 * index.
    -	 * 
    -	 * @param index
    -	 *            an index into the FontName list
    -	 * @return a FontName object
    -	 */
    -	public static FontName getFontName(int index) {
    -		FontName result = (FontName) FONT_NAMES.get(index);
    -		if (result != null) {
    -			return result;
    -		}
    -		return DEFAULT;
    -	}
    -
    -}
    \ No newline at end of file
    diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontStyle.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontStyle.java
    deleted file mode 100644
    index 55211d74cbd..00000000000
    --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/FontStyle.java
    +++ /dev/null
    @@ -1,197 +0,0 @@
    -/*******************************************************************************
    - * Copyright (c) 2009 IBM Corporation 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
    - * http://www.eclipse.org/legal/epl-v10.html
    - *
    - * Contributors:
    - *     IBM Corporation - initial API and implementation
    - *******************************************************************************/
    -//------------------------------------------------------------------------------
    -// Copyright (c) 2005, 2007 IBM Corporation 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
    -// http://www.eclipse.org/legal/epl-v10.html
    -//
    -// Contributors:
    -// IBM Corporation - initial implementation
    -//------------------------------------------------------------------------------
    -package org.eclipse.epf.richtext.html;
    -
    -import java.util.ArrayList;
    -import java.util.Iterator;
    -import java.util.List;
    -
    -import org.eclipse.epf.richtext.RichTextResources;
    -
    -/**
    - * Models a HTML font style.
    - * 
    - * @author Kelvin Low
    - * @since 1.0
    - */
    -public class FontStyle {
    -
    -	// The user friendly names.
    -	private static final String NAME_NORMAL = RichTextResources.fontStyle_normal;
    -
    -	private static final String NAME_SECTION_HEADING = RichTextResources.fontStyle_sectionHeading;
    -
    -	private static final String NAME_SUBSECTION_HEADING = RichTextResources.fontStyle_subsectionHeading;
    -
    -	private static final String NAME_SUB_SUBSECTION_HEADING = RichTextResources.fontStyle_subSubsectionHeading;
    -
    -	private static final String NAME_QUOTE = RichTextResources.fontStyle_quote;
    -
    -	private static final String NAME_CODE_SAMPLE = RichTextResources.fontStyle_codeSample;
    -
    -	// The internal values.
    -	private static final String VALUE_NORMAL = "

    "; //$NON-NLS-1$ - - private static final String VALUE_SECTION_HEADING = "

    "; //$NON-NLS-1$ - - private static final String VALUE_SUBSECTION_HEADING = "

    "; //$NON-NLS-1$ - - private static final String VALUE_SUB_SUBSECTION_HEADING = "

    "; //$NON-NLS-1$ - - private static final String VALUE_QUOTE = ""; //$NON-NLS-1$ - - private static final String VALUE_CODE_SAMPLE = ""; //$NON-NLS-1$ - - /** - * Font style for normal text. - */ - static public final FontStyle NORMAL = new FontStyle(NAME_NORMAL, - VALUE_NORMAL); - - /** - * Font style for section heading. - */ - static public final FontStyle SECTION_HEADING = new FontStyle( - NAME_SECTION_HEADING, VALUE_SECTION_HEADING); - - /** - * Font style for sub section heading. - */ - static public final FontStyle SUBSECTION_HEADING = new FontStyle( - NAME_SUBSECTION_HEADING, VALUE_SUBSECTION_HEADING); - /** - * Font style for sub sub section heading. - */ - static public final FontStyle SUB_SUBSECTION_HEADING = new FontStyle( - NAME_SUB_SUBSECTION_HEADING, VALUE_SUB_SUBSECTION_HEADING); - - /** - * Font style for quotations. - */ - static public final FontStyle QUOTE = new FontStyle(NAME_QUOTE, VALUE_QUOTE); - - /** - * Font style for displaying program codes. - */ - static public final FontStyle CODE_SAMPLE = new FontStyle(NAME_CODE_SAMPLE, - VALUE_CODE_SAMPLE); - - // A list of FontStyle objects. - static private final List FONT_STYLES = new ArrayList(); - static { - FONT_STYLES.add(NORMAL); - FONT_STYLES.add(SECTION_HEADING); - FONT_STYLES.add(SUBSECTION_HEADING); - FONT_STYLES.add(SUB_SUBSECTION_HEADING); - FONT_STYLES.add(QUOTE); - FONT_STYLES.add(CODE_SAMPLE); - } - - // The font style name. - private String name; - - // The font style value. - private String value; - - /** - * Creates a new instance. - * - * @param name - * the font style name - * @param value - * the font style value - */ - public FontStyle(String name, String value) { - this.name = name; - this.value = value; - } - - /** - * Gets the font style name. - * - * @return the font style name - */ - public String getName() { - return name; - } - - /** - * Gets the font style value. - * - * @return the font style value - */ - public String getValue() { - return value; - } - - /** - * Gets the FontStyle object that is mapped to the given - * index. - * - * @param index - * an index into the FontStyle list - * @return a FontStyle object - */ - public static FontStyle getFontStyle(int index) { - FontStyle result = (FontStyle) FONT_STYLES.get(index); - if (result != null) { - return result; - } - return NORMAL; - } - - /** - * Gets the display name of the FontStyle object with the - * given value. - * - * @param value - * one of the FontStyles - * @return a display name of a FontStyle, or null if none found - */ - public static String getFontStyleName(String value) { - for (Iterator iter = FONT_STYLES.iterator(); iter.hasNext();) { - FontStyle style = iter.next(); - if (style.getValue().equals(value)) { - return style.getName(); - } - } - return null; - } - - /** - * Gets the value of the FontStyle object with the - * given display name. - * - * @param name - * one of the FontStyles - * @return a value of a FontStyle, or null if none found - */ - public static String getFontStyleValue(String name) { - for (Iterator iter = FONT_STYLES.iterator(); iter.hasNext();) { - FontStyle style = iter.next(); - if (style.getName().equals(name)) { - return style.getValue(); - } - } - return null; - } - -} \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Image.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Image.java deleted file mode 100644 index 8a3a3a85e29..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Image.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.html; - -/** - * Models a simplified HTML <image> tag. - * - * @author Kelvin Low - * @since 1.0 - */ -public class Image { - - // The image URL. - private String url = ""; //$NON-NLS-1$ - - /** - * Creates a new instance. - */ - public Image() { - } - - /** - * Gets the image URL. - * - * @return the image URL - */ - public String getURL() { - return url; - } - - /** - * Sets the image URL. - * - * @param url - * the image URL - */ - public void setURL(String url) { - this.url = url; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Link.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Link.java deleted file mode 100644 index 6c5573cc515..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Link.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.html; - -/** - * Models a simplified HTML <link> tag. - * - * @author Kelvin Low - * @since 1.0 - */ -public class Link { - - // The link name. - private String name = ""; //$NON-NLS-1$ - - // The link URL. - private String url = ""; //$NON-NLS-1$ - - /** - * Creates a new instance. - */ - public Link() { - } - - /** - * Gets the link name. - * - * @return the link name. - */ - public String getName() { - return name; - } - - /** - * Sets the link name. - * - * @param name - * the link name - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the link URL. - * - * @return the link URL - */ - public String getURL() { - return url; - } - - /** - * Sets the link URL. - * - * @param url - * the link URL - */ - public void setURL(String url) { - this.url = url; - } - - /** - * @Gets the HTML representation of this link. - * - * @return the HTML representation of this link - */ - public String toHTML() { - return null; - } -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Table.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Table.java deleted file mode 100644 index a02b28f89b4..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/Table.java +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2007 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.html; - -/** - * Models a simplified HTML <table> tag. - * - * @author Kelvin Low - * @since 1.0 - */ -public class Table { - - /** - * A table with no headers. - */ - public static final int TABLE_HEADERS_NONE = 0; - - /** - * A table with column headers. - */ - public static final int TABLE_HEADERS_COLS = 1; - - /** - * A table with row headers. - */ - public static final int TABLE_HEADERS_ROWS = 2; - - /** - * A table with both column and row headers. - */ - public static final int TABLE_HEADERS_BOTH = 3; - - // The number of rows. - private int rows = 2; - - // The number of columns. - private int cols = 2; - - // The table width. - private String width = "85%"; //$NON-NLS-1$ - - // The type of tableheaders for this table. - private int tableHeaders = 0; - - // The table summary. - private String summary; - - // The table caption. - private String caption; - - /** - * Creates a new instance. - */ - public Table() { - } - - /** - * Gets the number of rows in the table. - * - * @return the number of rows - */ - public int getRows() { - return rows; - } - - /** - * Sets the number of rows in the table. - * - * @param rows - * the number of rows - */ - public void setRows(int rows) { - this.rows = rows; - } - - /** - * Gets the number of columns in the table. - * - * @return the number of columns - */ - public int getColumns() { - return cols; - } - - /** - * Sets the number of columns in the table. - * - * @param cols - * the number of columns - */ - public void setColumns(int cols) { - this.cols = cols; - } - - /** - * Gets the table width. - * - * @return the width of the table - */ - public String getWidth() { - return width; - } - - /** - * Sets the table width. - * - * @param width - * the width of the table - */ - public void setWidth(String width) { - this.width = width; - } - - /** - * Gets the table caption. - * - * @return the table caption - */ - public String getCaption() { - return caption; - } - - /** - * Sets the table caption. - * - * @para caption the table caption - */ - public void setCaption(String caption) { - this.caption = caption; - } - - /** - * Gets the table summary. - * - * @return the table summary - */ - public String getSummary() { - return summary; - } - - /** - * Sets the table summary. - * - * @param summary - * the table summary - */ - public void setSummary(String summary) { - this.summary = summary; - } - - /** - * Gets the table headers style. - * - * @return the integer with value representing - * TABLE_HEADERS_NONE, - * TABLE_HEADERS_COLS, - * TABLE_HEADERS_ROWS or - * TABLE_HEADERS_BOTH - */ - public int getTableHeaders() { - return tableHeaders; - } - - /** - * Sets the table headers style. - * - * @param tableHeaders - * an integer with value representing - * TABLE_HEADERS_NONE, - * TABLE_HEADERS_COLS, - * TABLE_HEADERS_ROWS or - * TABLE_HEADERS_BOTH - */ - public void setTableHeaders(int tableHeaders) { - this.tableHeaders = tableHeaders; - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/package.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/package.html deleted file mode 100644 index 7e143c8cf34..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/html/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides implementation support for the rich text control and editor. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/package.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/package.html deleted file mode 100644 index 0238fc370ea..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides the interfaces and implementation for the rich text control and editor. - - \ No newline at end of file diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencePage.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencePage.java deleted file mode 100644 index 6d3379fc763..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencePage.java +++ /dev/null @@ -1,183 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.preferences; - -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.epf.richtext.RichTextResources; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; - -/** - * The Preference page for the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextPreferencePage extends PreferencePage implements - IWorkbenchPreferencePage, SelectionListener, ModifyListener { - - private IPreferenceStore store; - - private Text lineWidthText; - - private Button indentCheckbox; - - private Text indentSizeText; - - /** - * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) - */ - public void init(IWorkbench workbench) { - store = RichTextPlugin.getDefault().getPreferenceStore(); - } - - /** - * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) - */ - protected Control createContents(Composite parent) { - Composite composite = new Composite(parent, SWT.NONE); - composite.setLayout(new GridLayout(1, false)); - composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Composite widthComposite = new Composite(composite, SWT.NONE); - widthComposite.setLayout(new GridLayout(2, false)); - widthComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label lineWidthLabel = new Label(widthComposite, SWT.NONE); - lineWidthLabel.setText(RichTextResources.maxCharsPerLineLabel_text); - - lineWidthText = new Text(widthComposite, SWT.BORDER); - lineWidthText.setText(store.getString(RichTextPreferences.LINE_WIDTH)); - lineWidthText.setTextLimit(3); - GridData gridData = new GridData(); - gridData.widthHint = 25; - lineWidthText.setLayoutData(gridData); - lineWidthText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - } - }); - - Composite indentComposite = new Composite(composite, SWT.NONE); - indentComposite.setLayout(new GridLayout(2, false)); - indentComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - indentCheckbox = new Button(indentComposite, SWT.CHECK); - indentCheckbox.setText(RichTextResources.indentHTMLCheckbox_text); - indentCheckbox.setSelection(store - .getBoolean(RichTextPreferences.INDENT)); - - new Label(indentComposite, SWT.NONE); - - Label indentSizeLabel = new Label(indentComposite, SWT.NONE); - gridData = new GridData(); - gridData.horizontalIndent = 20; - indentSizeLabel.setLayoutData(gridData); - indentSizeLabel.setText(RichTextResources.indentSizeLabel_text); - - indentSizeText = new Text(indentComposite, SWT.BORDER); - indentSizeText - .setText(store.getString(RichTextPreferences.INDENT_SIZE)); - indentSizeText.setTextLimit(1); - gridData = new GridData(); - gridData.widthHint = 10; - indentSizeText.setLayoutData(gridData); - indentSizeText.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - } - }); - - return composite; - } - - /** - * @see org.eclipse.jface.preference.PreferencePage.performDefaults - */ - protected void performDefaults() { - super.performDefaults(); - lineWidthText.setText(store - .getDefaultString(RichTextPreferences.LINE_WIDTH)); - indentCheckbox.setSelection(store - .getDefaultBoolean(RichTextPreferences.INDENT)); - indentSizeText.setText(store - .getDefaultString(RichTextPreferences.INDENT_SIZE)); - } - - /** - * @see org.eclipse.jface.preference.PreferencePage.performOk - */ - public boolean performOk() { - String lineWidthValue = lineWidthText.getText(); - if (lineWidthValue != null && lineWidthValue.length() > 0) { - try { - int lineWidth = Integer.parseInt(lineWidthValue); - store.setValue(RichTextPreferences.LINE_WIDTH, lineWidth); - } catch (Exception e) { - } - } - - boolean indentValue = indentCheckbox.getSelection(); - store.setValue(RichTextPreferences.INDENT, indentValue); - - String indentSizeValue = indentSizeText.getText(); - if (indentSizeValue != null && indentSizeValue.length() > 0) { - try { - int indentSize = Integer.parseInt(indentSizeValue); - store.setValue(RichTextPreferences.INDENT_SIZE, indentSize); - } catch (Exception e) { - } - } - - return true; - } - - /** - * @see org.eclipse.swt.events.SelectionListener#widgetSelected(SelectionEvent) - */ - public void widgetSelected(SelectionEvent e) { - } - - /** - * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(SelectionEvent) - */ - public void widgetDefaultSelected(SelectionEvent e) { - } - - /** - * @see org.eclipse.swt.events.ModifyListener#modifyText(ModifyEvent) - */ - public void modifyText(ModifyEvent e) { - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferences.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferences.java deleted file mode 100644 index f593198c73f..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferences.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.preferences; - -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * Preferences for the rich text editor. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextPreferences { - - /** - * rich text Editor preference keys. - */ - public static final String LINE_WIDTH = "htmlEditor.lineWidth"; //$NON-NLS-1$ - - public static final String INDENT = "htmlEditor.indent"; //$NON-NLS-1$ - - public static final String INDENT_SIZE = "htmlEditor.indentSize"; //$NON-NLS-1$ - - /** - * Initializes the default preferences. - */ - public static void initializeDefaultPreferences(IPreferenceStore store) { - store.setDefault(LINE_WIDTH, 120); - store.setDefault(INDENT, true); - store.setDefault(INDENT_SIZE, 4); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencesInitializer.java b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencesInitializer.java deleted file mode 100644 index 8bdeb071fed..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/RichTextPreferencesInitializer.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 IBM Corporation 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -//------------------------------------------------------------------------------ -// Copyright (c) 2005, 2006 IBM Corporation 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 -// http://www.eclipse.org/legal/epl-v10.html -// -// Contributors: -// IBM Corporation - initial implementation -//------------------------------------------------------------------------------ -package org.eclipse.epf.richtext.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.epf.richtext.RichTextPlugin; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * The rich text preferences initializer. - * - * @author Kelvin Low - * @since 1.0 - */ -public class RichTextPreferencesInitializer extends - AbstractPreferenceInitializer { - - /** - * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() - */ - public void initializeDefaultPreferences() { - IPreferenceStore store = RichTextPlugin.getDefault() - .getPreferenceStore(); - RichTextPreferences.initializeDefaultPreferences(store); - } - -} diff --git a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/package.html b/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/package.html deleted file mode 100644 index 292b3aeec02..00000000000 --- a/extraplugins/epf-richtext/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/preferences/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -Provides preference support for the rich text control and editor. - - \ No newline at end of file -- cgit v1.2.3 From 045637731659e7d3128af2069417099548a3a1cb Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:00:40 +0100 Subject: [Releng] Move the oep.sasheditor.ui plug-in to the deprecated folder --- .../org.eclipse.papyrus.sasheditor.ui/.classpath | 7 + .../org.eclipse.papyrus.sasheditor.ui/.project | 28 ++ .../META-INF/MANIFEST.MF | 13 + .../build.properties | 7 + .../org.eclipse.papyrus.sasheditor.ui/contexts.xml | 12 + .../icons/sample.gif | Bin 0 -> 983 bytes .../org.eclipse.papyrus.sasheditor.ui/plugin.xml | 38 +++ .../eclipse/papyrus/sasheditor/ui/Activator.java | 64 +++++ .../sasheditor/ui/views/SashWindowsView.java | 123 ++++++++ .../sasheditor/ui/views/SashWindowsViewModel.java | 320 +++++++++++++++++++++ .../sasheditor/ui/views/SashWindowsViewPart.java | 141 +++++++++ .../org.eclipse.papyrus.sasheditor.ui/.classpath | 7 - .../org.eclipse.papyrus.sasheditor.ui/.project | 28 -- .../META-INF/MANIFEST.MF | 13 - .../build.properties | 7 - .../org.eclipse.papyrus.sasheditor.ui/contexts.xml | 12 - .../icons/sample.gif | Bin 983 -> 0 bytes .../org.eclipse.papyrus.sasheditor.ui/plugin.xml | 38 --- .../eclipse/papyrus/sasheditor/ui/Activator.java | 64 ----- .../sasheditor/ui/views/SashWindowsView.java | 123 -------- .../sasheditor/ui/views/SashWindowsViewModel.java | 320 --------------------- .../sasheditor/ui/views/SashWindowsViewPart.java | 141 --------- 22 files changed, 753 insertions(+), 753 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/.classpath create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/.project create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/build.properties create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/contexts.xml create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java create mode 100644 deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.classpath delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.project delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/build.properties delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/contexts.xml delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/plugin.xml delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java delete mode 100644 extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/.classpath b/deprecated/org.eclipse.papyrus.sasheditor.ui/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/.project b/deprecated/org.eclipse.papyrus.sasheditor.ui/.project new file mode 100644 index 00000000000..128d28c4703 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.sasheditor.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..6750130f072 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Ui +Bundle-SymbolicName: org.eclipse.papyrus.sasheditor.ui; singleton:=true +Bundle-Version: 1.0.0 +Bundle-Activator: org.eclipse.papyrus.sasheditor.ui.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.sasheditor;bundle-version="0.7.0", + org.eclipse.ui.forms;bundle-version="3.4.0", + org.eclipse.jface.text;bundle-version="3.5.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/build.properties b/deprecated/org.eclipse.papyrus.sasheditor.ui/build.properties new file mode 100644 index 00000000000..255e23b619c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + contexts.xml diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/contexts.xml b/deprecated/org.eclipse.papyrus.sasheditor.ui/contexts.xml new file mode 100644 index 00000000000..64aff45a3ad --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/contexts.xml @@ -0,0 +1,12 @@ + + + This is the context help for the sample view with a tree viewer. It was generated by a PDE template. + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif b/deprecated/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif new file mode 100644 index 00000000000..34fb3c9d8cb Binary files /dev/null and b/deprecated/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif differ diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/plugin.xml b/deprecated/org.eclipse.papyrus.sasheditor.ui/plugin.xml new file mode 100644 index 00000000000..8f36319eff1 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/plugin.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java new file mode 100644 index 00000000000..100b9943bf1 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java @@ -0,0 +1,64 @@ +package org.eclipse.papyrus.sasheditor.ui; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.sasheditor.ui"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java new file mode 100644 index 00000000000..f9f7907d5bb --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java @@ -0,0 +1,123 @@ +/** + * + */ +package org.eclipse.papyrus.sasheditor.ui.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.ScrolledForm; + + +/** + * An View (from MVC) used to render data from the SashWindows. + * This view is implemented with SWT. + * + * @author cedric dumoulin + */ +public class SashWindowsView { + + private FormToolkit toolkit; + + private ScrolledForm form; + + private Text selectedElement; + + private Text selectedPage; + + private Text selectedPageName; + + private Text selectedFolder; + + private Text selectedIEditor; + + private Text selectedIEditorName; + + private final String TITLE = "SashWindows"; + + /** + * Create associated part control. + * + * @param parent + */ + public void createPartControl(Composite parent) { + toolkit = new FormToolkit(parent.getDisplay()); + form = toolkit.createScrolledForm(parent); + form.setText(TITLE); + + GridLayout layout = new GridLayout(); + layout.numColumns = 2; + form.getBody().setLayout(layout); + + // + selectedElement = createInputText("Selected Element:", ""); + selectedPage = createInputText("selected Page:", ""); + selectedPageName = createInputText(" page name:", ""); + selectedFolder = createInputText("selected Folder:", ""); + selectedIEditor = createInputText("selected IEditor:", ""); + selectedIEditorName = createInputText(" editor name:", ""); + + } + + /** + * Create a Text with a label and an initial value. + * + * @param labelValue + * @param textValue + * @return + */ + private Text createInputText(String labelValue, String textValue) { + Text text; + GridData gd = new GridData(); + Label label = toolkit.createLabel(form.getBody(), labelValue); + label.setLayoutData(gd); + text = toolkit.createText(form.getBody(), textValue, SWT.BORDER); + text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + return text; + } + + public void setselectedElement(String newText) { + selectedElement.setText(newText); + } + + public void setSelectedPage(String newText) { + selectedPage.setText(newText); + } + + public void setSelectedPageName(String newText) { + selectedPageName.setText(newText); + } + + public void setSelectedFolder(String newText) { + selectedFolder.setText(newText); + } + + public void setSelectedIEditor(String newText) { + selectedIEditor.setText(newText); + } + + public void setSelectedIEditorName(String newText) { + selectedIEditorName.setText(newText); + } + + + /** + * Dispose all resources + */ + public void dispose() { + toolkit.dispose(); + } + + /** + * Set focus to this element. + */ + public void setFocus() { + form.setFocus(); + } + +} diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java new file mode 100644 index 00000000000..ba95ca7a7be --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java @@ -0,0 +1,320 @@ +/** + * + */ +package org.eclipse.papyrus.sasheditor.ui.views; + +import java.util.ArrayList; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.papyrus.sasheditor.editor.IPage; +import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener; +import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer; +import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainerChangedListener; +import org.eclipse.papyrus.sasheditor.editor.SashWindowsEventsProvider; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchPage; + + +/** + * The model (from MVC) storing data to be shown by the ui. + * Data owned : + *
      + *
    • selected element
    • + *
    • current page (tabfolder)
    • + *
    • current folder
    • + *
    • current eclipse editor
    • + *
    + * + * A faire: + * - ecouter les evenements sash + * - ecouter les evenements Eclipse selectionChanged + * - envoyer evenement qd une valeur a change + * - creer la classe ModelEvent indiquant le type d'evenement ? + * - creer l'interface IModelEventListener permettant d'ecouter les events du model. + * Q: une methode par event, ou alors un type dans l'event ? + * - Completer la classe View avec la UI + * - Completer ViewPart pour mettre le model et la UI en relation. + * + * Regarder les exemples dans SashWindowsViewOrig + * + * @author cedric dumoulin + * + */ +public class SashWindowsViewModel { + + + + /** + * Interface implemented by classes wishing to be called when a change happen in the model. + * + * @author cedric dumoulin + * + */ + public interface IModelChangedListener { + + /** + * This method is called when a value has changed in the model. + * + * @param changedModel + * The model that has changed. + */ + public void modelChanged(SashWindowsViewModel changedModel); + + } + + /** + * List of listeners on model changed events. + */ + private ListenersManager listenersManager = new ListenersManager(); + + + /** Object providing events on SashWindows life cycle. */ + private SashWindowsEventsProvider sashWindowEventsManager; + + /** Current editor shown by the view, or null */ + private IEditorPart currentEditor = null; + + /** The last selected element, or null */ + private Object selectedElement = null; + + /** + * Listener on Eclipse selection changed. + */ + private ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() { + + public void selectionChanged(SelectionChangedEvent event) { + System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".selectionChanged(" + event + ")"); + + SashWindowsViewModel.this.selectionChanged(event.getSelection()); + } + }; + + /** + * Listener listening on pageChanged event. + */ + private IPageChangedListener pageChangedListener = new IPageChangedListener() { + + public void pageChanged(IPage newPage) { + System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".pageChanged(" + newPage + ")"); + selectionChanged(); + } + }; + + /** + * Listener listening on containerChanged event. + */ + private ISashWindowsContainerChangedListener containerChangedListener = new ISashWindowsContainerChangedListener() { + + public void sashWindowsContainerChanged(ISashWindowsContainer newContainer) + { + // Get the active editor, which should be the one owning the new page + // Set it to null if the container is null. + System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".sashWindowsContainerChanged(" + newContainer + ")"); + + reconnectSelectionListener(); + } + }; + + + + /** + * + * Constructor. + * + * @param workbenchPage + */ + public SashWindowsViewModel(IWorkbenchPage workbenchPage) { + sashWindowEventsManager = new SashWindowsEventsProvider(workbenchPage); + + activateIncomingEventListeners(); + } + + /** + * Dispose this model. + * All resources are cleaned. The model should not be used again. + */ + public void dispose() { + deactivateIncomingEventListeners(); + sashWindowEventsManager.dispose(); + listenersManager.clear(); + } + + + /** + * Get the listener manager allowing to register / remove listeners. + * + * @return the listenersManager + */ + public ListenersManager getListenersManager() { + return listenersManager; + } + + /** + * Activate listeners on incoming events. + */ + private void activateIncomingEventListeners() { + sashWindowEventsManager.addPageChangedListener(pageChangedListener); + sashWindowEventsManager.addSashWindowsContainerChangedListener(containerChangedListener); + reconnectSelectionListener(); + } + + /** + * Activate listeners on incoming events. + */ + private void deactivateIncomingEventListeners() { + disconnectSelectionListener(); + sashWindowEventsManager.removePageChangedListener(pageChangedListener); + sashWindowEventsManager.removeSashWindowsContainerChangedListener(containerChangedListener); + } + + /** + * Connect the selection listener to the current IEditor (Eclipse editor). + * Remove the listener from the previous editor if it is attached. + */ + private void reconnectSelectionListener() { + // Remove listening on all editor + if(currentEditor != null) { + currentEditor.getSite().getSelectionProvider().removeSelectionChangedListener(selectionChangedListener); + } + + currentEditor = sashWindowEventsManager.activeSashWindowsContainerOwner(); + if(currentEditor != null) { + currentEditor.getSite().getSelectionProvider().addSelectionChangedListener(selectionChangedListener); + } + } + + /** + * Remove the listener from the previous editor if it is attached. + */ + private void disconnectSelectionListener() { + // Remove listening on all editor + if(currentEditor != null) { + currentEditor.getSite().getSelectionProvider().removeSelectionChangedListener(selectionChangedListener); + } + } + + /** + * Trigger the event to registered listeners + */ + private void fireChangedEvent() { + listenersManager.fireChangedEvent(this); + } + + /** + * This method is called when the selection has changed. + * This method lookup the selection. + * TODO Hook this to Container changed instead of selection changed. + */ + private void selectionChanged() { + IEditorPart activeEditor = sashWindowEventsManager.activeSashWindowsContainerOwner(); + // Check if there is an active editor. + if(activeEditor == null) { + selectionChanged(null); + return; + } + + // Set the active selection + ISelection selection = activeEditor.getSite().getSelectionProvider().getSelection(); + selectionChanged(selection); + } + + /** + * The selection has changed. + * + * @param selection + */ + protected void selectionChanged(ISelection selection) { + + if(selection instanceof StructuredSelection) { + StructuredSelection structuredSelection = (StructuredSelection)selection; + selectedElement = structuredSelection.getFirstElement(); + } else { + selectedElement = selection; + } + + // Fire changed event. + fireChangedEvent(); + } + + + /** + * Get the currently first selected element. + * + * @return The currently first selected element, or null if none is selected. + */ + public Object getSelectedElement() { + return selectedElement; + } + + /** + * Get the currently selected SashWindows Page + * + * @return The currently selected SashWindows Page, or null if none is selected. + */ + public IPage getSelectedSashWindowsPage() { + return sashWindowEventsManager.activeSashWindowsPage(); + } + + // /** + // * Get the currently selected SashWindows Folder + // * @return The currently selected SashWindows Page, or null if none is selected. + // */ + // public IFolder getSelectedSashWindowsFolder() + // { + // return sashWindowEventsManager.SashWindowsFolder(); + // } + + /** + * Get the currently selected SashWindows Page (IE. + * + * @return The currently selected SashWindows Page, or null if none is selected. + */ + public IEditorPart getSelectedIEditorPart() { + return sashWindowEventsManager.activeSashWindowsContainerOwner(); + + } + + /** + * Class used to register Listener and to send events to these listeners. + * + * @author cedric dumoulin + * + */ + public class ListenersManager extends ArrayList { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Add a listener that will be notified when the fireChangedEvent() method is called. + * + * @param listener + */ + public void addModelChangedListener(IModelChangedListener listener) { + add(listener); + } + + /** + * Remove a listener. + * + * @param listener + */ + public void removeModelChangedListener(IModelChangedListener listener) { + remove(listener); + } + + /** + * Fire the event to all registered listeners. + */ + public void fireChangedEvent(SashWindowsViewModel changedModel) { + for(IModelChangedListener listener : this) { + listener.modelChanged(changedModel); + } + } + } +} diff --git a/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java new file mode 100644 index 00000000000..f3ceff10af2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java @@ -0,0 +1,141 @@ +package org.eclipse.papyrus.sasheditor.ui.views; + +import org.eclipse.papyrus.sasheditor.editor.IPage; +import org.eclipse.papyrus.sasheditor.ui.views.SashWindowsViewModel.IModelChangedListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IViewSite; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.ViewPart; + + +/** + * An Eclipse View showing data from the SashWindows. + * This class is an example showing how to have a UI following changes from editors + * and sash windows. + */ + +public class SashWindowsViewPart extends ViewPart { + + /** + * The ID of the view as specified by the extension. + */ + public static final String ID = "org.eclipse.papyrus.sasheditor.ui.views.SashWindowsView"; + + /** Class managing selected element rendering */ + private SashWindowsView figure; + + /** The model to be rendered */ + private SashWindowsViewModel model; + + /** + * Listener on model changed events. + */ + private IModelChangedListener modelChangedListener = new IModelChangedListener() { + + public void modelChanged(SashWindowsViewModel changedModel) { + refreshView(); + } + }; + + + + /** + * The constructor. + */ + public SashWindowsViewPart() { + } + + + /** + * Refresh the SWT view with values from the specified element + */ + private void refreshView() { + + // selected element + Object selectedElement = getModel().getSelectedElement(); + if(selectedElement != null) { + figure.setselectedElement(selectedElement.toString()); + } else { + figure.setselectedElement(""); + } + + // selected page + IPage page = getModel().getSelectedSashWindowsPage(); + if(page != null) { + figure.setSelectedPage(page.toString()); + figure.setSelectedPageName(page.getPageTitle()); + // figure.setSelectedPageIcon(page.getPageIcon()); + } else { + figure.setSelectedPage(""); + figure.setSelectedPageName(""); + // figure.setSelectedPageIcon(null); + } + + // selected folder + // selectedElementViewer.setSelectedFolder(getModel().getSelectedFolder().toString()); + // selected Editor + IEditorPart editor = getModel().getSelectedIEditorPart(); + if(editor != null) { + figure.setSelectedIEditor(editor.toString()); + figure.setSelectedIEditorName(editor.getTitle()); + } else { + figure.setSelectedIEditor(""); + figure.setSelectedIEditorName(""); + } + + + } + + /** + * + * @return + */ + private SashWindowsViewModel getModel() { + return model; + } + + /** + * This is a callback that will allow us + * to create the viewer and initialize it. + */ + public void createPartControl(Composite parent) { + + Composite container = parent; + + figure = new SashWindowsView(); + figure.createPartControl(container); + } + + /** + * Initialize the view + * + * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite) + * + * @param site + * @throws PartInitException + */ + @Override + public void init(IViewSite site) throws PartInitException { + super.init(site); + model = new SashWindowsViewModel(site.getPage()); + model.getListenersManager().addModelChangedListener(modelChangedListener); + } + + @Override + public void dispose() { + model.getListenersManager().removeModelChangedListener(modelChangedListener); + model.dispose(); + figure.dispose(); + super.dispose(); + } + + /** + * Passing the focus request to the viewer's control. + */ + public void setFocus() { + // viewer.getControl().setFocus(); + figure.setFocus(); + } + +} diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.classpath b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.project b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.project deleted file mode 100644 index 128d28c4703..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.sasheditor.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF deleted file mode 100644 index 6750130f072..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Ui -Bundle-SymbolicName: org.eclipse.papyrus.sasheditor.ui; singleton:=true -Bundle-Version: 1.0.0 -Bundle-Activator: org.eclipse.papyrus.sasheditor.ui.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.sasheditor;bundle-version="0.7.0", - org.eclipse.ui.forms;bundle-version="3.4.0", - org.eclipse.jface.text;bundle-version="3.5.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/build.properties b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/build.properties deleted file mode 100644 index 255e23b619c..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/,\ - contexts.xml diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/contexts.xml b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/contexts.xml deleted file mode 100644 index 64aff45a3ad..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/contexts.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - This is the context help for the sample view with a tree viewer. It was generated by a PDE template. - - - - - - - - - diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif deleted file mode 100644 index 34fb3c9d8cb..00000000000 Binary files a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/icons/sample.gif and /dev/null differ diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/plugin.xml b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/plugin.xml deleted file mode 100644 index 8f36319eff1..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/plugin.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java deleted file mode 100644 index 100b9943bf1..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/Activator.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.eclipse.papyrus.sasheditor.ui; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.sasheditor.ui"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java deleted file mode 100644 index f9f7907d5bb..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsView.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * - */ -package org.eclipse.papyrus.sasheditor.ui.views; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.forms.widgets.FormToolkit; -import org.eclipse.ui.forms.widgets.ScrolledForm; - - -/** - * An View (from MVC) used to render data from the SashWindows. - * This view is implemented with SWT. - * - * @author cedric dumoulin - */ -public class SashWindowsView { - - private FormToolkit toolkit; - - private ScrolledForm form; - - private Text selectedElement; - - private Text selectedPage; - - private Text selectedPageName; - - private Text selectedFolder; - - private Text selectedIEditor; - - private Text selectedIEditorName; - - private final String TITLE = "SashWindows"; - - /** - * Create associated part control. - * - * @param parent - */ - public void createPartControl(Composite parent) { - toolkit = new FormToolkit(parent.getDisplay()); - form = toolkit.createScrolledForm(parent); - form.setText(TITLE); - - GridLayout layout = new GridLayout(); - layout.numColumns = 2; - form.getBody().setLayout(layout); - - // - selectedElement = createInputText("Selected Element:", ""); - selectedPage = createInputText("selected Page:", ""); - selectedPageName = createInputText(" page name:", ""); - selectedFolder = createInputText("selected Folder:", ""); - selectedIEditor = createInputText("selected IEditor:", ""); - selectedIEditorName = createInputText(" editor name:", ""); - - } - - /** - * Create a Text with a label and an initial value. - * - * @param labelValue - * @param textValue - * @return - */ - private Text createInputText(String labelValue, String textValue) { - Text text; - GridData gd = new GridData(); - Label label = toolkit.createLabel(form.getBody(), labelValue); - label.setLayoutData(gd); - text = toolkit.createText(form.getBody(), textValue, SWT.BORDER); - text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - return text; - } - - public void setselectedElement(String newText) { - selectedElement.setText(newText); - } - - public void setSelectedPage(String newText) { - selectedPage.setText(newText); - } - - public void setSelectedPageName(String newText) { - selectedPageName.setText(newText); - } - - public void setSelectedFolder(String newText) { - selectedFolder.setText(newText); - } - - public void setSelectedIEditor(String newText) { - selectedIEditor.setText(newText); - } - - public void setSelectedIEditorName(String newText) { - selectedIEditorName.setText(newText); - } - - - /** - * Dispose all resources - */ - public void dispose() { - toolkit.dispose(); - } - - /** - * Set focus to this element. - */ - public void setFocus() { - form.setFocus(); - } - -} diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java deleted file mode 100644 index ba95ca7a7be..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewModel.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * - */ -package org.eclipse.papyrus.sasheditor.ui.views; - -import java.util.ArrayList; - -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.papyrus.sasheditor.editor.IPage; -import org.eclipse.papyrus.sasheditor.editor.IPageChangedListener; -import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainer; -import org.eclipse.papyrus.sasheditor.editor.ISashWindowsContainerChangedListener; -import org.eclipse.papyrus.sasheditor.editor.SashWindowsEventsProvider; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchPage; - - -/** - * The model (from MVC) storing data to be shown by the ui. - * Data owned : - *
      - *
    • selected element
    • - *
    • current page (tabfolder)
    • - *
    • current folder
    • - *
    • current eclipse editor
    • - *
    - * - * A faire: - * - ecouter les evenements sash - * - ecouter les evenements Eclipse selectionChanged - * - envoyer evenement qd une valeur a change - * - creer la classe ModelEvent indiquant le type d'evenement ? - * - creer l'interface IModelEventListener permettant d'ecouter les events du model. - * Q: une methode par event, ou alors un type dans l'event ? - * - Completer la classe View avec la UI - * - Completer ViewPart pour mettre le model et la UI en relation. - * - * Regarder les exemples dans SashWindowsViewOrig - * - * @author cedric dumoulin - * - */ -public class SashWindowsViewModel { - - - - /** - * Interface implemented by classes wishing to be called when a change happen in the model. - * - * @author cedric dumoulin - * - */ - public interface IModelChangedListener { - - /** - * This method is called when a value has changed in the model. - * - * @param changedModel - * The model that has changed. - */ - public void modelChanged(SashWindowsViewModel changedModel); - - } - - /** - * List of listeners on model changed events. - */ - private ListenersManager listenersManager = new ListenersManager(); - - - /** Object providing events on SashWindows life cycle. */ - private SashWindowsEventsProvider sashWindowEventsManager; - - /** Current editor shown by the view, or null */ - private IEditorPart currentEditor = null; - - /** The last selected element, or null */ - private Object selectedElement = null; - - /** - * Listener on Eclipse selection changed. - */ - private ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() { - - public void selectionChanged(SelectionChangedEvent event) { - System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".selectionChanged(" + event + ")"); - - SashWindowsViewModel.this.selectionChanged(event.getSelection()); - } - }; - - /** - * Listener listening on pageChanged event. - */ - private IPageChangedListener pageChangedListener = new IPageChangedListener() { - - public void pageChanged(IPage newPage) { - System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".pageChanged(" + newPage + ")"); - selectionChanged(); - } - }; - - /** - * Listener listening on containerChanged event. - */ - private ISashWindowsContainerChangedListener containerChangedListener = new ISashWindowsContainerChangedListener() { - - public void sashWindowsContainerChanged(ISashWindowsContainer newContainer) - { - // Get the active editor, which should be the one owning the new page - // Set it to null if the container is null. - System.out.println(SashWindowsViewModel.this.getClass().getSimpleName() + ".sashWindowsContainerChanged(" + newContainer + ")"); - - reconnectSelectionListener(); - } - }; - - - - /** - * - * Constructor. - * - * @param workbenchPage - */ - public SashWindowsViewModel(IWorkbenchPage workbenchPage) { - sashWindowEventsManager = new SashWindowsEventsProvider(workbenchPage); - - activateIncomingEventListeners(); - } - - /** - * Dispose this model. - * All resources are cleaned. The model should not be used again. - */ - public void dispose() { - deactivateIncomingEventListeners(); - sashWindowEventsManager.dispose(); - listenersManager.clear(); - } - - - /** - * Get the listener manager allowing to register / remove listeners. - * - * @return the listenersManager - */ - public ListenersManager getListenersManager() { - return listenersManager; - } - - /** - * Activate listeners on incoming events. - */ - private void activateIncomingEventListeners() { - sashWindowEventsManager.addPageChangedListener(pageChangedListener); - sashWindowEventsManager.addSashWindowsContainerChangedListener(containerChangedListener); - reconnectSelectionListener(); - } - - /** - * Activate listeners on incoming events. - */ - private void deactivateIncomingEventListeners() { - disconnectSelectionListener(); - sashWindowEventsManager.removePageChangedListener(pageChangedListener); - sashWindowEventsManager.removeSashWindowsContainerChangedListener(containerChangedListener); - } - - /** - * Connect the selection listener to the current IEditor (Eclipse editor). - * Remove the listener from the previous editor if it is attached. - */ - private void reconnectSelectionListener() { - // Remove listening on all editor - if(currentEditor != null) { - currentEditor.getSite().getSelectionProvider().removeSelectionChangedListener(selectionChangedListener); - } - - currentEditor = sashWindowEventsManager.activeSashWindowsContainerOwner(); - if(currentEditor != null) { - currentEditor.getSite().getSelectionProvider().addSelectionChangedListener(selectionChangedListener); - } - } - - /** - * Remove the listener from the previous editor if it is attached. - */ - private void disconnectSelectionListener() { - // Remove listening on all editor - if(currentEditor != null) { - currentEditor.getSite().getSelectionProvider().removeSelectionChangedListener(selectionChangedListener); - } - } - - /** - * Trigger the event to registered listeners - */ - private void fireChangedEvent() { - listenersManager.fireChangedEvent(this); - } - - /** - * This method is called when the selection has changed. - * This method lookup the selection. - * TODO Hook this to Container changed instead of selection changed. - */ - private void selectionChanged() { - IEditorPart activeEditor = sashWindowEventsManager.activeSashWindowsContainerOwner(); - // Check if there is an active editor. - if(activeEditor == null) { - selectionChanged(null); - return; - } - - // Set the active selection - ISelection selection = activeEditor.getSite().getSelectionProvider().getSelection(); - selectionChanged(selection); - } - - /** - * The selection has changed. - * - * @param selection - */ - protected void selectionChanged(ISelection selection) { - - if(selection instanceof StructuredSelection) { - StructuredSelection structuredSelection = (StructuredSelection)selection; - selectedElement = structuredSelection.getFirstElement(); - } else { - selectedElement = selection; - } - - // Fire changed event. - fireChangedEvent(); - } - - - /** - * Get the currently first selected element. - * - * @return The currently first selected element, or null if none is selected. - */ - public Object getSelectedElement() { - return selectedElement; - } - - /** - * Get the currently selected SashWindows Page - * - * @return The currently selected SashWindows Page, or null if none is selected. - */ - public IPage getSelectedSashWindowsPage() { - return sashWindowEventsManager.activeSashWindowsPage(); - } - - // /** - // * Get the currently selected SashWindows Folder - // * @return The currently selected SashWindows Page, or null if none is selected. - // */ - // public IFolder getSelectedSashWindowsFolder() - // { - // return sashWindowEventsManager.SashWindowsFolder(); - // } - - /** - * Get the currently selected SashWindows Page (IE. - * - * @return The currently selected SashWindows Page, or null if none is selected. - */ - public IEditorPart getSelectedIEditorPart() { - return sashWindowEventsManager.activeSashWindowsContainerOwner(); - - } - - /** - * Class used to register Listener and to send events to these listeners. - * - * @author cedric dumoulin - * - */ - public class ListenersManager extends ArrayList { - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * Add a listener that will be notified when the fireChangedEvent() method is called. - * - * @param listener - */ - public void addModelChangedListener(IModelChangedListener listener) { - add(listener); - } - - /** - * Remove a listener. - * - * @param listener - */ - public void removeModelChangedListener(IModelChangedListener listener) { - remove(listener); - } - - /** - * Fire the event to all registered listeners. - */ - public void fireChangedEvent(SashWindowsViewModel changedModel) { - for(IModelChangedListener listener : this) { - listener.modelChanged(changedModel); - } - } - } -} diff --git a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java b/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java deleted file mode 100644 index f3ceff10af2..00000000000 --- a/extraplugins/developer/org.eclipse.papyrus.sasheditor.ui/src/org/eclipse/papyrus/sasheditor/ui/views/SashWindowsViewPart.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.eclipse.papyrus.sasheditor.ui.views; - -import org.eclipse.papyrus.sasheditor.editor.IPage; -import org.eclipse.papyrus.sasheditor.ui.views.SashWindowsViewModel.IModelChangedListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IViewSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.ViewPart; - - -/** - * An Eclipse View showing data from the SashWindows. - * This class is an example showing how to have a UI following changes from editors - * and sash windows. - */ - -public class SashWindowsViewPart extends ViewPart { - - /** - * The ID of the view as specified by the extension. - */ - public static final String ID = "org.eclipse.papyrus.sasheditor.ui.views.SashWindowsView"; - - /** Class managing selected element rendering */ - private SashWindowsView figure; - - /** The model to be rendered */ - private SashWindowsViewModel model; - - /** - * Listener on model changed events. - */ - private IModelChangedListener modelChangedListener = new IModelChangedListener() { - - public void modelChanged(SashWindowsViewModel changedModel) { - refreshView(); - } - }; - - - - /** - * The constructor. - */ - public SashWindowsViewPart() { - } - - - /** - * Refresh the SWT view with values from the specified element - */ - private void refreshView() { - - // selected element - Object selectedElement = getModel().getSelectedElement(); - if(selectedElement != null) { - figure.setselectedElement(selectedElement.toString()); - } else { - figure.setselectedElement(""); - } - - // selected page - IPage page = getModel().getSelectedSashWindowsPage(); - if(page != null) { - figure.setSelectedPage(page.toString()); - figure.setSelectedPageName(page.getPageTitle()); - // figure.setSelectedPageIcon(page.getPageIcon()); - } else { - figure.setSelectedPage(""); - figure.setSelectedPageName(""); - // figure.setSelectedPageIcon(null); - } - - // selected folder - // selectedElementViewer.setSelectedFolder(getModel().getSelectedFolder().toString()); - // selected Editor - IEditorPart editor = getModel().getSelectedIEditorPart(); - if(editor != null) { - figure.setSelectedIEditor(editor.toString()); - figure.setSelectedIEditorName(editor.getTitle()); - } else { - figure.setSelectedIEditor(""); - figure.setSelectedIEditorName(""); - } - - - } - - /** - * - * @return - */ - private SashWindowsViewModel getModel() { - return model; - } - - /** - * This is a callback that will allow us - * to create the viewer and initialize it. - */ - public void createPartControl(Composite parent) { - - Composite container = parent; - - figure = new SashWindowsView(); - figure.createPartControl(container); - } - - /** - * Initialize the view - * - * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite) - * - * @param site - * @throws PartInitException - */ - @Override - public void init(IViewSite site) throws PartInitException { - super.init(site); - model = new SashWindowsViewModel(site.getPage()); - model.getListenersManager().addModelChangedListener(modelChangedListener); - } - - @Override - public void dispose() { - model.getListenersManager().removeModelChangedListener(modelChangedListener); - model.dispose(); - figure.dispose(); - super.dispose(); - } - - /** - * Passing the focus request to the viewer's control. - */ - public void setFocus() { - // viewer.getControl().setFocus(); - figure.setFocus(); - } - -} -- cgit v1.2.3 From 9896d4c14b26d6c3f78dbfaed2cb227a34e1ed99 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:21:04 +0100 Subject: [Releng] Move the oep.qvtTransformation plug-in to the deprecated folder --- .../.classpath | 7 + .../org.eclipse.papyrus.qvtTransformation/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 17 ++ .../build.properties | 6 + .../icons/icon.gif | Bin 0 -> 279 bytes .../plugin.xml | 29 ++++ .../papyrus/qvttransformation/Activator.java | 77 +++++++++ .../popup/actions/SelectQVTTransformation.java | 176 +++++++++++++++++++++ .../.classpath | 7 - .../org.eclipse.papyrus.qvtTransformation/.project | 28 ---- .../.settings/org.eclipse.jdt.core.prefs | 8 - .../META-INF/MANIFEST.MF | 17 -- .../papyrus/qvttransformation/Activator.class | Bin 1235 -> 0 bytes .../popup/actions/SelectQVTTransformation.class | Bin 1364 -> 0 bytes .../build.properties | 6 - .../icons/icon.gif | Bin 279 -> 0 bytes .../plugin.xml | 29 ---- .../papyrus/qvttransformation/Activator.java | 77 --------- .../popup/actions/SelectQVTTransformation.java | 176 --------------------- 20 files changed, 348 insertions(+), 348 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/.classpath create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/.project create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/build.properties create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/.classpath delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/.project delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/Activator.class delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.class delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/build.properties delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/icons/icon.gif delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/plugin.xml delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java delete mode 100644 extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath b/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath new file mode 100644 index 00000000000..8a8f1668cdc --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/.project b/deprecated/org.eclipse.papyrus.qvtTransformation/.project new file mode 100644 index 00000000000..fc20664dbb7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.qvtTransformation + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..bedb6e48320 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Wed Aug 25 14:15:47 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..366e510fbc3 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: QvtTransformation +Bundle-SymbolicName: org.eclipse.papyrus.qvtTransformation; singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.eclipse.papyrus.qvttransformation.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.emf.ecore;bundle-version="2.5.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.4.0", + org.eclipse.m2m.qvt.oml;bundle-version="3.0.0", + org.eclipse.papyrus.core, + org.eclipse.m2m.qvt.oml.runtime;bundle-version="2.1.0", + org.eclipse.m2m.qvt.oml.common;bundle-version="2.1.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties b/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties new file mode 100644 index 00000000000..4b8162ab8b2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/ diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif b/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif new file mode 100644 index 00000000000..2c1ceaf036e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.qvtTransformation/icons/icon.gif differ diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml b/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml new file mode 100644 index 00000000000..8294a8d4f36 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/plugin.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java new file mode 100644 index 00000000000..bed24bdc18a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java @@ -0,0 +1,77 @@ +/***************************************************************************** + * Copyright (c) 2008 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.qvttransformation; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.qvtTransformation"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java new file mode 100644 index 00000000000..33d9fc465f1 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java @@ -0,0 +1,176 @@ +/***************************************************************************** + * Copyright (c) 2008 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.qvttransformation.popup.actions; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.internal.resources.File; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.m2m.internal.qvt.oml.common.MdaException; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter.DirectionKind; +import org.eclipse.m2m.qvt.oml.BasicModelExtent; +import org.eclipse.m2m.qvt.oml.ExecutionContextImpl; +import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; +import org.eclipse.m2m.qvt.oml.ModelExtent; +import org.eclipse.m2m.qvt.oml.TransformationExecutor; +import org.eclipse.papyrus.core.utils.EditorUtils; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionDelegate; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; +import org.eclipse.ui.model.BaseWorkbenchContentProvider; +import org.eclipse.ui.model.WorkbenchLabelProvider; + +/** + * + * This class implements a possible integration of QVTo in Papyrus + * + * + */ +public class SelectQVTTransformation implements IObjectActionDelegate { + + private Shell shell; + + /** + * The selected DiagramEditPart + */ + protected DiagramEditPart diagramEditPart = null; + + /** + * Constructor for SelectQVTTransformation. + */ + public SelectQVTTransformation() { + super(); + } + + /** + * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) + */ + public void setActivePart(IAction action, IWorkbenchPart targetPart) { + shell = targetPart.getSite().getShell(); + } + + /** + * @see IActionDelegate#run(IAction) + */ + public void run(IAction action) { + if(diagramEditPart != null) { + //Open a dialog to select the transformation to execute + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider()); + dialog.setTitle("Select a transformation"); + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + dialog.setAllowMultiple(false); + dialog.open(); + Object[] result = dialog.getResult(); + + if(result != null) { + + final File transformationFile = (File)result[0]; + if(transformationFile.getFileExtension().contains("qvt")) { + + //Reification of the transformation + QvtTransformation transfo = new QvtInterpretedTransformation(transformationFile); + //Retrieve transformation's parameters + List params; + try { + params = transfo.getParameters(); + + //The transformation must have only one parameter. + if(params.size() == 1) { + //Retrieve first parameter's metamodels + List metamodels = params.get(0).getMetamodels(); + + //The parameter must be INOUT and it only have UML as metamodel + if(params.get(0).getDirectionKind() == DirectionKind.INOUT && metamodels.size() == 1 && metamodels.get(0).getNsPrefix().compareToIgnoreCase("uml") == 0) { + + //Define the command in Papyrus' editing domain + RecordingCommand command = new RecordingCommand(EditorUtils.getTransactionalEditingDomain()) { + + @Override + protected void doExecute() { + URI uri = URI.createPlatformResourceURI(transformationFile.getFullPath().toString(), true); + + //Create a executor for the transformation + TransformationExecutor executor = new TransformationExecutor(uri); + + //Define the input as the model that contains the selected diagramEditPart + List contents = new ArrayList(); + EObject element = diagramEditPart.resolveSemanticElement(); + contents.add(element); + + ModelExtent input = new BasicModelExtent(contents); + //ModelExtent output = new BasicModelExtent(); + + ExecutionContextImpl context = new ExecutionContextImpl(); + //Execute the transformation + ExecutionDiagnostic diagnostic = executor.execute(context, input); + + //Report success or failure + if(diagnostic.getSeverity() == Diagnostic.OK) { + MessageDialog.openInformation(shell, "QvtTransformation", "Transformation was executed corretly."); + } else { + IStatus status = BasicDiagnostic.toIStatus(diagnostic); + MessageDialog.openError(shell, "QvtTransformation", "Errors occured during the transformation: " + status.getMessage()); + } + } + }; + + //Execute the command + EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(command); + + } else { + MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : we support only transformations with only one parameter. This parameter must be INOUT and it only have UML as metamodel"); + } + } else { + MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : the transformation must have only one parameter"); + } + } catch (MdaException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + } + } + + /** + * @see IActionDelegate#selectionChanged(IAction, ISelection) + */ + public void selectionChanged(IAction action, ISelection selection) { + if(selection instanceof IStructuredSelection) { + Object selectedElement = ((IStructuredSelection)selection).getFirstElement(); + if(selectedElement instanceof DiagramEditPart) { + diagramEditPart = (DiagramEditPart)selectedElement; + } + } + } + +} diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/.classpath b/extraplugins/org.eclipse.papyrus.qvtTransformation/.classpath deleted file mode 100644 index 8a8f1668cdc..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/.project b/extraplugins/org.eclipse.papyrus.qvtTransformation/.project deleted file mode 100644 index fc20664dbb7..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.qvtTransformation - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs b/extraplugins/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index bedb6e48320..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Aug 25 14:15:47 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF b/extraplugins/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF deleted file mode 100644 index 366e510fbc3..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: QvtTransformation -Bundle-SymbolicName: org.eclipse.papyrus.qvtTransformation; singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.eclipse.papyrus.qvttransformation.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.emf.ecore;bundle-version="2.5.0", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.4.0", - org.eclipse.m2m.qvt.oml;bundle-version="3.0.0", - org.eclipse.papyrus.core, - org.eclipse.m2m.qvt.oml.runtime;bundle-version="2.1.0", - org.eclipse.m2m.qvt.oml.common;bundle-version="2.1.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/Activator.class b/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/Activator.class deleted file mode 100644 index 4f172d963f5..00000000000 Binary files a/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/Activator.class and /dev/null differ diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.class b/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.class deleted file mode 100644 index 39b4f182f0f..00000000000 Binary files a/extraplugins/org.eclipse.papyrus.qvtTransformation/bin/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.class and /dev/null differ diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/build.properties b/extraplugins/org.eclipse.papyrus.qvtTransformation/build.properties deleted file mode 100644 index 4b8162ab8b2..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - icons/ diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/icons/icon.gif b/extraplugins/org.eclipse.papyrus.qvtTransformation/icons/icon.gif deleted file mode 100644 index 2c1ceaf036e..00000000000 Binary files a/extraplugins/org.eclipse.papyrus.qvtTransformation/icons/icon.gif and /dev/null differ diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/plugin.xml b/extraplugins/org.eclipse.papyrus.qvtTransformation/plugin.xml deleted file mode 100644 index 8294a8d4f36..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/plugin.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java b/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java deleted file mode 100644 index bed24bdc18a..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/Activator.java +++ /dev/null @@ -1,77 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.qvttransformation; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.qvtTransformation"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java b/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java deleted file mode 100644 index 33d9fc465f1..00000000000 --- a/extraplugins/org.eclipse.papyrus.qvtTransformation/src/org/eclipse/papyrus/qvttransformation/popup/actions/SelectQVTTransformation.java +++ /dev/null @@ -1,176 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.qvttransformation.popup.actions; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.internal.resources.File; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.emf.common.util.BasicDiagnostic; -import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.transaction.RecordingCommand; -import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.m2m.internal.qvt.oml.common.MdaException; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter.DirectionKind; -import org.eclipse.m2m.qvt.oml.BasicModelExtent; -import org.eclipse.m2m.qvt.oml.ExecutionContextImpl; -import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; -import org.eclipse.m2m.qvt.oml.ModelExtent; -import org.eclipse.m2m.qvt.oml.TransformationExecutor; -import org.eclipse.papyrus.core.utils.EditorUtils; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IActionDelegate; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; -import org.eclipse.ui.model.BaseWorkbenchContentProvider; -import org.eclipse.ui.model.WorkbenchLabelProvider; - -/** - * - * This class implements a possible integration of QVTo in Papyrus - * - * - */ -public class SelectQVTTransformation implements IObjectActionDelegate { - - private Shell shell; - - /** - * The selected DiagramEditPart - */ - protected DiagramEditPart diagramEditPart = null; - - /** - * Constructor for SelectQVTTransformation. - */ - public SelectQVTTransformation() { - super(); - } - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - shell = targetPart.getSite().getShell(); - } - - /** - * @see IActionDelegate#run(IAction) - */ - public void run(IAction action) { - if(diagramEditPart != null) { - //Open a dialog to select the transformation to execute - ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider()); - dialog.setTitle("Select a transformation"); - dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); - dialog.setAllowMultiple(false); - dialog.open(); - Object[] result = dialog.getResult(); - - if(result != null) { - - final File transformationFile = (File)result[0]; - if(transformationFile.getFileExtension().contains("qvt")) { - - //Reification of the transformation - QvtTransformation transfo = new QvtInterpretedTransformation(transformationFile); - //Retrieve transformation's parameters - List params; - try { - params = transfo.getParameters(); - - //The transformation must have only one parameter. - if(params.size() == 1) { - //Retrieve first parameter's metamodels - List metamodels = params.get(0).getMetamodels(); - - //The parameter must be INOUT and it only have UML as metamodel - if(params.get(0).getDirectionKind() == DirectionKind.INOUT && metamodels.size() == 1 && metamodels.get(0).getNsPrefix().compareToIgnoreCase("uml") == 0) { - - //Define the command in Papyrus' editing domain - RecordingCommand command = new RecordingCommand(EditorUtils.getTransactionalEditingDomain()) { - - @Override - protected void doExecute() { - URI uri = URI.createPlatformResourceURI(transformationFile.getFullPath().toString(), true); - - //Create a executor for the transformation - TransformationExecutor executor = new TransformationExecutor(uri); - - //Define the input as the model that contains the selected diagramEditPart - List contents = new ArrayList(); - EObject element = diagramEditPart.resolveSemanticElement(); - contents.add(element); - - ModelExtent input = new BasicModelExtent(contents); - //ModelExtent output = new BasicModelExtent(); - - ExecutionContextImpl context = new ExecutionContextImpl(); - //Execute the transformation - ExecutionDiagnostic diagnostic = executor.execute(context, input); - - //Report success or failure - if(diagnostic.getSeverity() == Diagnostic.OK) { - MessageDialog.openInformation(shell, "QvtTransformation", "Transformation was executed corretly."); - } else { - IStatus status = BasicDiagnostic.toIStatus(diagnostic); - MessageDialog.openError(shell, "QvtTransformation", "Errors occured during the transformation: " + status.getMessage()); - } - } - }; - - //Execute the command - EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(command); - - } else { - MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : we support only transformations with only one parameter. This parameter must be INOUT and it only have UML as metamodel"); - } - } else { - MessageDialog.openError(shell, "QvtTransformation", "Transformation signature is invalid : the transformation must have only one parameter"); - } - } catch (MdaException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - } - } - - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) { - if(selection instanceof IStructuredSelection) { - Object selectedElement = ((IStructuredSelection)selection).getFirstElement(); - if(selectedElement instanceof DiagramEditPart) { - diagramEditPart = (DiagramEditPart)selectedElement; - } - } - } - -} -- cgit v1.2.3 From 691f9f5892565c6066c7ea23821dbed22441dc79 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:30:36 +0100 Subject: [Releng] Move the oep.conversion plug-ins to the deprecated folder --- .../.project | 17 + .../build.properties | 5 + .../eclipse_update_120.jpg | Bin 0 -> 21695 bytes .../epl-v10.html | 304 + .../feature.properties | 145 + .../feature.xml | 40 + .../license.html | 79 + .../org.eclipse.papyrus.conversion.di2/.classpath | 8 + .../org.eclipse.papyrus.conversion.di2/.project | 33 + .../META-INF/MANIFEST.MF | 20 + .../build.properties | 22 + .../papyrus/conversion/di2/DiConstants.java | 33 + .../model/OLDdi2.genmodel | 115 + .../model/UML.ecore | 10032 +++++++++++++++++++ .../model/di2-master.ecore | 148 + .../model/di2.ecore | 172 + .../model/di2.genmodel | 125 + .../model/di2withoutUMLEcore.ecore | 117 + .../model/note.txt | 132 + .../plugin.properties | 13 + .../org.eclipse.papyrus.conversion.di2/plugin.xml | 20 + .../conversion/di2/CoreSemanticModelBridge.java | 19 + .../eclipse/papyrus/conversion/di2/Di2Factory.java | 205 + .../eclipse/papyrus/conversion/di2/Di2Package.java | 4337 ++++++++ .../eclipse/papyrus/conversion/di2/Diagram.java | 187 + .../papyrus/conversion/di2/DiagramElement.java | 489 + .../papyrus/conversion/di2/DiagramLink.java | 144 + .../eclipse/papyrus/conversion/di2/Ellipse.java | 195 + .../papyrus/conversion/di2/GraphConnector.java | 115 + .../eclipse/papyrus/conversion/di2/GraphEdge.java | 106 + .../papyrus/conversion/di2/GraphElement.java | 150 + .../eclipse/papyrus/conversion/di2/GraphNode.java | 55 + .../papyrus/conversion/di2/GraphicPrimitive.java | 19 + .../org/eclipse/papyrus/conversion/di2/Image.java | 81 + .../papyrus/conversion/di2/LeafElement.java | 19 + .../conversion/di2/PapyrusKeyEnumeration.java | 182 + .../eclipse/papyrus/conversion/di2/Polilyne.java | 63 + .../eclipse/papyrus/conversion/di2/Property.java | 83 + .../eclipse/papyrus/conversion/di2/Reference.java | 86 + .../conversion/di2/SemanticModelBridge.java | 87 + .../conversion/di2/SimpleSemanticModelElement.java | 55 + .../papyrus/conversion/di2/TextElement.java | 53 + .../conversion/di2/Uml1SemanticModelBridge.java | 57 + .../di2/impl/CoreSemanticModelBridgeImpl.java | 43 + .../conversion/di2/impl/Di2FactoryImpl.java | 508 + .../conversion/di2/impl/Di2PackageImpl.java | 1436 +++ .../conversion/di2/impl/DiagramElementImpl.java | 1048 ++ .../papyrus/conversion/di2/impl/DiagramImpl.java | 466 + .../conversion/di2/impl/DiagramLinkImpl.java | 356 + .../papyrus/conversion/di2/impl/EllipseImpl.java | 445 + .../conversion/di2/impl/GraphConnectorImpl.java | 328 + .../papyrus/conversion/di2/impl/GraphEdgeImpl.java | 278 + .../conversion/di2/impl/GraphElementImpl.java | 401 + .../papyrus/conversion/di2/impl/GraphNodeImpl.java | 169 + .../conversion/di2/impl/GraphicPrimitiveImpl.java | 43 + .../papyrus/conversion/di2/impl/ImageImpl.java | 222 + .../conversion/di2/impl/LeafElementImpl.java | 43 + .../papyrus/conversion/di2/impl/PolilyneImpl.java | 191 + .../papyrus/conversion/di2/impl/PropertyImpl.java | 222 + .../papyrus/conversion/di2/impl/ReferenceImpl.java | 238 + .../di2/impl/SemanticModelBridgeImpl.java | 236 + .../di2/impl/SimpleSemanticModelElementImpl.java | 170 + .../conversion/di2/impl/TextElementImpl.java | 167 + .../di2/impl/Uml1SemanticModelBridgeImpl.java | 165 + .../conversion/di2/util/Di2AdapterFactory.java | 481 + .../papyrus/conversion/di2/util/Di2Switch.java | 574 ++ .../.classpath | 7 + .../.project | 34 + .../META-INF/MANIFEST.MF | 28 + .../ClassAndProfileDiagEdgeVisualIDs.qvto | 39 + .../ClassAndProfileDiagEdges.qvto | 280 + .../TransfoQvtoDi2toDi/ClassDiagNodes.qvto | 658 ++ .../TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto | 66 + .../TransfoQvtoDi2toDi/CompositeDiagEdges.qvto | 162 + .../TransfoQvtoDi2toDi/CompositeDiagNodes.qvto | 284 + .../TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto | 34 + .../TransfoQvtoDi2toDi/DiTransformations.qvto | 103 + .../TransfoQvtoDi2toDi/Diagram.qvto | 213 + .../TransfoQvtoDi2toDi/ElementType.qvto | 25 + .../GeneralMappingsandHelpers.qvto | 136 + .../TransfoQvtoDi2toDi/NotationQueries.qvto | 168 + .../TransfoQvtoDi2toDi/ProfileDiagNodes.qvto | 273 + .../TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto | 55 + .../TransfoQvtoDi2toDi/StateDiagEdges.qvto | 160 + .../TransfoQvtoDi2toDi/StateDiagNodes.qvto | 308 + .../TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto | 84 + .../TransfoQvtoDi2toDi/Transfo.qvto | 25 + .../build.properties | 6 + .../doc/TutorialConversion.html | 294 + .../doc/figs/conversion-example-di2action.png | Bin 0 -> 23573 bytes .../doc/figs/conversion-example-project.png | Bin 0 -> 3998 bytes .../doc/figs/conversion-example-result.png | Bin 0 -> 5420 bytes .../doc/figs/example-composite-diag-mdt.png | Bin 0 -> 20800 bytes .../doc/figs/example-composite-diag-p1.12.png | Bin 0 -> 20127 bytes .../doc/figs/example1-class-diagram-mdt.png | Bin 0 -> 20393 bytes .../doc/figs/example1-class-diagram-p1.12.png | Bin 0 -> 20119 bytes .../doc/figs/example2-class-diagram-mdt.png | Bin 0 -> 27481 bytes .../doc/figs/example2-class-diagram-p1.12.png | Bin 0 -> 33830 bytes .../plugin.properties | 12 + .../plugin.xml | 55 + .../papyrus/conversion/di2todi/Activator.java | 61 + .../di2todi/blackboxes/UtilitiesLibrary.java | 236 + .../di2todi/popupactions/Di2toDiAction.java | 253 + .../di2todi/popupactions/PapyrusNamespace.java | 80 + .../org.eclipse.papyrus.conversion.di2todi/toc.xml | 10 + .../tocdev.xml | 7 + .../.project | 17 - .../build.properties | 5 - .../eclipse_update_120.jpg | Bin 21695 -> 0 bytes .../epl-v10.html | 304 - .../feature.properties | 145 - .../feature.xml | 40 - .../license.html | 79 - .../org.eclipse.papyrus.conversion.di2/.classpath | 8 - .../org.eclipse.papyrus.conversion.di2/.project | 33 - .../META-INF/MANIFEST.MF | 20 - .../build.properties | 22 - .../papyrus/conversion/di2/DiConstants.java | 33 - .../model/OLDdi2.genmodel | 115 - .../model/UML.ecore | 10032 ------------------- .../model/di2-master.ecore | 148 - .../model/di2.ecore | 172 - .../model/di2.genmodel | 125 - .../model/di2withoutUMLEcore.ecore | 117 - .../model/note.txt | 132 - .../plugin.properties | 13 - .../org.eclipse.papyrus.conversion.di2/plugin.xml | 20 - .../conversion/di2/CoreSemanticModelBridge.java | 19 - .../eclipse/papyrus/conversion/di2/Di2Factory.java | 205 - .../eclipse/papyrus/conversion/di2/Di2Package.java | 4337 -------- .../eclipse/papyrus/conversion/di2/Diagram.java | 187 - .../papyrus/conversion/di2/DiagramElement.java | 489 - .../papyrus/conversion/di2/DiagramLink.java | 144 - .../eclipse/papyrus/conversion/di2/Ellipse.java | 195 - .../papyrus/conversion/di2/GraphConnector.java | 115 - .../eclipse/papyrus/conversion/di2/GraphEdge.java | 106 - .../papyrus/conversion/di2/GraphElement.java | 150 - .../eclipse/papyrus/conversion/di2/GraphNode.java | 55 - .../papyrus/conversion/di2/GraphicPrimitive.java | 19 - .../org/eclipse/papyrus/conversion/di2/Image.java | 81 - .../papyrus/conversion/di2/LeafElement.java | 19 - .../conversion/di2/PapyrusKeyEnumeration.java | 182 - .../eclipse/papyrus/conversion/di2/Polilyne.java | 63 - .../eclipse/papyrus/conversion/di2/Property.java | 83 - .../eclipse/papyrus/conversion/di2/Reference.java | 86 - .../conversion/di2/SemanticModelBridge.java | 87 - .../conversion/di2/SimpleSemanticModelElement.java | 55 - .../papyrus/conversion/di2/TextElement.java | 53 - .../conversion/di2/Uml1SemanticModelBridge.java | 57 - .../di2/impl/CoreSemanticModelBridgeImpl.java | 43 - .../conversion/di2/impl/Di2FactoryImpl.java | 508 - .../conversion/di2/impl/Di2PackageImpl.java | 1436 --- .../conversion/di2/impl/DiagramElementImpl.java | 1048 -- .../papyrus/conversion/di2/impl/DiagramImpl.java | 466 - .../conversion/di2/impl/DiagramLinkImpl.java | 356 - .../papyrus/conversion/di2/impl/EllipseImpl.java | 445 - .../conversion/di2/impl/GraphConnectorImpl.java | 328 - .../papyrus/conversion/di2/impl/GraphEdgeImpl.java | 278 - .../conversion/di2/impl/GraphElementImpl.java | 401 - .../papyrus/conversion/di2/impl/GraphNodeImpl.java | 169 - .../conversion/di2/impl/GraphicPrimitiveImpl.java | 43 - .../papyrus/conversion/di2/impl/ImageImpl.java | 222 - .../conversion/di2/impl/LeafElementImpl.java | 43 - .../papyrus/conversion/di2/impl/PolilyneImpl.java | 191 - .../papyrus/conversion/di2/impl/PropertyImpl.java | 222 - .../papyrus/conversion/di2/impl/ReferenceImpl.java | 238 - .../di2/impl/SemanticModelBridgeImpl.java | 236 - .../di2/impl/SimpleSemanticModelElementImpl.java | 170 - .../conversion/di2/impl/TextElementImpl.java | 167 - .../di2/impl/Uml1SemanticModelBridgeImpl.java | 165 - .../conversion/di2/util/Di2AdapterFactory.java | 481 - .../papyrus/conversion/di2/util/Di2Switch.java | 574 -- .../.classpath | 7 - .../.project | 34 - .../META-INF/MANIFEST.MF | 28 - .../ClassAndProfileDiagEdgeVisualIDs.qvto | 39 - .../ClassAndProfileDiagEdges.qvto | 280 - .../TransfoQvtoDi2toDi/ClassDiagNodes.qvto | 658 -- .../TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto | 66 - .../TransfoQvtoDi2toDi/CompositeDiagEdges.qvto | 162 - .../TransfoQvtoDi2toDi/CompositeDiagNodes.qvto | 284 - .../TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto | 34 - .../TransfoQvtoDi2toDi/DiTransformations.qvto | 103 - .../TransfoQvtoDi2toDi/Diagram.qvto | 213 - .../TransfoQvtoDi2toDi/ElementType.qvto | 25 - .../GeneralMappingsandHelpers.qvto | 136 - .../TransfoQvtoDi2toDi/NotationQueries.qvto | 168 - .../TransfoQvtoDi2toDi/ProfileDiagNodes.qvto | 273 - .../TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto | 55 - .../TransfoQvtoDi2toDi/StateDiagEdges.qvto | 160 - .../TransfoQvtoDi2toDi/StateDiagNodes.qvto | 308 - .../TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto | 84 - .../TransfoQvtoDi2toDi/Transfo.qvto | 25 - .../build.properties | 6 - .../doc/TutorialConversion.html | 294 - .../doc/figs/conversion-example-di2action.png | Bin 23573 -> 0 bytes .../doc/figs/conversion-example-project.png | Bin 3998 -> 0 bytes .../doc/figs/conversion-example-result.png | Bin 5420 -> 0 bytes .../doc/figs/example-composite-diag-mdt.png | Bin 20800 -> 0 bytes .../doc/figs/example-composite-diag-p1.12.png | Bin 20127 -> 0 bytes .../doc/figs/example1-class-diagram-mdt.png | Bin 20393 -> 0 bytes .../doc/figs/example1-class-diagram-p1.12.png | Bin 20119 -> 0 bytes .../doc/figs/example2-class-diagram-mdt.png | Bin 27481 -> 0 bytes .../doc/figs/example2-class-diagram-p1.12.png | Bin 33830 -> 0 bytes .../plugin.properties | 12 - .../plugin.xml | 55 - .../papyrus/conversion/di2todi/Activator.java | 61 - .../di2todi/blackboxes/UtilitiesLibrary.java | 236 - .../di2todi/popupactions/Di2toDiAction.java | 253 - .../di2todi/popupactions/PapyrusNamespace.java | 80 - .../org.eclipse.papyrus.conversion.di2todi/toc.xml | 10 - .../tocdev.xml | 7 - 212 files changed, 30753 insertions(+), 30753 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/.project create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/build.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/epl-v10.html create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/feature.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/feature.xml create mode 100644 deprecated/org.eclipse.papyrus.conversion-feature/license.html create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/.classpath create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/.project create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/build.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/UML.ecore create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/di2.ecore create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/di2.genmodel create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/model/note.txt create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/.classpath create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/.project create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/build.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/toc.xml create mode 100644 deprecated/org.eclipse.papyrus.conversion.di2todi/tocdev.xml delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/.project delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/build.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/epl-v10.html delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.xml delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion-feature/license.html delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.classpath delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.project delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/build.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/UML.ecore delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.ecore delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.genmodel delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/note.txt delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.xml delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.classpath delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.project delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/build.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.properties delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.xml delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/toc.xml delete mode 100644 extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/tocdev.xml (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/.project b/deprecated/org.eclipse.papyrus.conversion-feature/.project new file mode 100644 index 00000000000..d2f295e1a2a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.papyrus.conversion-feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/build.properties b/deprecated/org.eclipse.papyrus.conversion-feature/build.properties new file mode 100644 index 00000000000..9c864246773 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/build.properties @@ -0,0 +1,5 @@ +bin.includes = feature.xml,\ + feature.properties,\ + eclipse_update_120.jpg,\ + epl-v10.html,\ + license.html diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg b/deprecated/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg new file mode 100644 index 00000000000..bfdf708ad61 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg differ diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/epl-v10.html b/deprecated/org.eclipse.papyrus.conversion-feature/epl-v10.html new file mode 100644 index 00000000000..cb1073a4bad --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/epl-v10.html @@ -0,0 +1,304 @@ + + + + + + +Eclipse Public License - Version 1.0 + + + + + +
    + +

    Eclipse Public License - v 1.0 +

    + +

    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.

    + +

    1. DEFINITIONS

    + +

    "Contribution" means:

    + +

    a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and
    +b) in the case of each subsequent Contributor:

    + +

    i) +changes to the Program, and

    + +

    ii) +additions to the Program;

    + +

    where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program.

    + +

    "Contributor" means any person or +entity that distributes the Program.

    + +

    "Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program.

    + +

    "Program" means the Contributions +distributed in accordance with this Agreement.

    + +

    "Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.

    + +

    2. GRANT OF RIGHTS

    + +

    a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.

    + +

    b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder.

    + +

    c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.

    + +

    d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement.

    + +

    3. REQUIREMENTS

    + +

    A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that: +

    + +

    a) +it complies with the terms and conditions of this Agreement; and

    + +

    b) +its license agreement:

    + +

    i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose;

    + +

    ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits;

    + +

    iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and

    + +

    iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.

    + +

    When the Program is made available in source +code form:

    + +

    a) +it must be made available under this Agreement; and

    + +

    b) a +copy of this Agreement must be included with each copy of the Program.

    + +

    Contributors may not remove or alter any +copyright notices contained within the Program.

    + +

    Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution.

    + +

    4. COMMERCIAL DISTRIBUTION

    + +

    Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.

    + +

    For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.

    + +

    5. NO WARRANTY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations.

    + +

    6. DISCLAIMER OF LIABILITY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.

    + +

    7. GENERAL

    + +

    If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.

    + +

    If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed.

    + +

    All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.

    + +

    Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.

    + +

    This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.

    + +

    + +
    + + + + \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/feature.properties b/deprecated/org.eclipse.papyrus.conversion-feature/feature.properties new file mode 100644 index 00000000000..7e8977d5850 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/feature.properties @@ -0,0 +1,145 @@ +# NLS_MESSAGEFORMAT_VAR + +# "featureName" property - name of the feature +featureName=MARTE profile (Incubation) + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse Modeling Project + +# "description" property - description of the feature +description=Contains a diagram converter from Papyrus 1.x to Papyrus MDT + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 14, 2010\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## + + +# "UpdateSiteName" property - label for the update site (on download1.eclipse.org) +PapyrusUpdateSiteName=MDT Papyrus Extra Updates - Nightly builds diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/feature.xml b/deprecated/org.eclipse.papyrus.conversion-feature/feature.xml new file mode 100644 index 00000000000..ad450331f44 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/feature.xml @@ -0,0 +1,40 @@ + + + + + This feature includes an implementation of a diagram converter +from Papyrus 1.x to Papyrus MDT. + + + + Copyright (c) 2008-2011 CEA LIST +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 +http://www.eclipse.org/legal/epl-v10.html + + + + %license + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion-feature/license.html b/deprecated/org.eclipse.papyrus.conversion-feature/license.html new file mode 100644 index 00000000000..a9b560f44cd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion-feature/license.html @@ -0,0 +1,79 @@ + + + + +Eclipse.org Software User Agreement + + + +

    Eclipse Foundation Software User Agreement

    +

    March 17, 2005

    + +

    Usage Of Content

    + +

    THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

    + +

    Applicable Licenses

    + +

    Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

    + +

    Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS + modules ("Modules") and made available as downloadable archives ("Downloads").

    + +
      +
    • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
    • +
    • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
    • +
    • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
    • +
    • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
    • +
    + +

    The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

    + +
      +
    • The top-level (root) directory
    • +
    • Plug-in and Fragment directories
    • +
    • Inside Plug-ins and Fragments packaged as JARs
    • +
    • Sub-directories of the directory named "src" of certain Plug-ins
    • +
    • Feature directories
    • +
    + +

    Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

    + +

    THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

    + + + +

    IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

    + +

    Cryptography

    + +

    Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

    + +Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/.classpath b/deprecated/org.eclipse.papyrus.conversion.di2/.classpath new file mode 100644 index 00000000000..aad3b0bc0eb --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/.project b/deprecated/org.eclipse.papyrus.conversion.di2/.project new file mode 100644 index 00000000000..fd7cb505981 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/.project @@ -0,0 +1,33 @@ + + + org.eclipse.papyrus.conversion.di2 + + + + + + com.ibm.etools.common.migration.MigrationBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..8443b2db054 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.conversion.di2;singleton:=true +Bundle-Version: 0.8.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %pluginProvider +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.papyrus.conversion.di2, + org.eclipse.papyrus.conversion.di2.impl, + org.eclipse.papyrus.conversion.di2.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.uml2.types;visibility:=reexport, + org.eclipse.gef, + org.eclipse.uml2.uml +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/build.properties b/deprecated/org.eclipse.papyrus.conversion.di2/build.properties new file mode 100644 index 00000000000..9945044204e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/build.properties @@ -0,0 +1,22 @@ +# +# +# +# $Id$ + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/,\ + customsrc/ +output.. = bin/ +src.includes = src/,\ + plugin.xml,\ + plugin.properties,\ + model/,\ + build.properties,\ + META-INF/,\ + .project,\ + .classpath diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java b/deprecated/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java new file mode 100644 index 00000000000..c48f281f5b9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java @@ -0,0 +1,33 @@ +package org.eclipse.papyrus.conversion.di2; + +/** constant for DI2 **/ +public interface DiConstants { + + /** constant for Type diagram **/ + public final String CLASS_DIAGRAM = "ClassDiagram"; + + public final String COMPOSITE_STRUCTURE_DIAGRAM = "CompositeStructureDiagram"; + + public final String COMPONENT_DIAGRAM = "ComponentDiagram"; + + public final String DEPLOYMENT_DIAGRAM = "DeploymentDiagram"; + + public final String OBJECT_DIAGRAM = "ObjectDiagram"; + + public final String PACKAGE_DIAGRAM = "PackageDiagram"; + + public final String ACTIVITY_DIAGRAM = "ActivityDiagram"; + + public final String SEQUENCE_DIAGRAM = "SequenceDiagram"; + + public final String COMMUNICATION_DIAGRAM = "CommunicationDiagram"; + + public final String INTERACTION_OVERVIEW_DIAGRAM = "InteractionOverviewDiagram"; + + public final String TIMING_DIAGRAM = "TimingDiagram"; + + public final String USE_CASE_DIAGRAM = "UseCaseDiagram"; + + public final String STATE_MACHINE_DIAGRAM = "StateMachineDiagram"; + +} diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel b/deprecated/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel new file mode 100644 index 00000000000..c0b6c84e8c9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel @@ -0,0 +1,115 @@ + + + di2.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/UML.ecore b/deprecated/org.eclipse.papyrus.conversion.di2/model/UML.ecore new file mode 100644 index 00000000000..7206ff84e61 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/UML.ecore @@ -0,0 +1,10032 @@ + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + +
    + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + + + + +
    + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + + + +
    + + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + +
    + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + +
    + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + + + + +
    + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + +
    + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + + + +
    + + + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + + +
    + + + + + + + + +
    + + + + + +
    + + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + + + +
    + + + +
    + + + + + + + +
    + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + + +
    + + + +
    + + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + + +
    + + +
    + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + + +
    + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + + + +
    + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + +
    + + + + +
    + + + + + + +
    + + + +
    + + + + + + +
    + + +
    + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore new file mode 100644 index 00000000000..0e2ecdd82a4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.ecore b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.ecore new file mode 100644 index 00000000000..cebea7ea7c3 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.ecore @@ -0,0 +1,172 @@ + + + + + +
    + + + + + +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.genmodel b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.genmodel new file mode 100644 index 00000000000..a5b082c3462 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2.genmodel @@ -0,0 +1,125 @@ + + + di2.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore new file mode 100644 index 00000000000..1dd61696f84 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/model/note.txt b/deprecated/org.eclipse.papyrus.conversion.di2/model/note.txt new file mode 100644 index 00000000000..7b2c4715872 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/model/note.txt @@ -0,0 +1,132 @@ + + /** + * + * + * @generated NOT + */ + public Point createPointFromString(EDataType eDataType, String initialValue) { + //return (Point)super.createFromString(eDataType, initialValue); + if (initialValue == null) return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); + return new Point(new Double(st.nextToken()).doubleValue(),new Double(st.nextToken()).doubleValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertPointToString(EDataType eDataType, Object instanceValue) { + //return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) return null; + + return ""+ ((Point) (instanceValue)).x+":"+((Point) (instanceValue)).y; + + } + + /** + * + * + * @generated NOT + */ + public Dimension createDimensionFromString(EDataType eDataType, String initialValue) { + //return (Dimension)super.createFromString(eDataType, initialValue); + if (initialValue == null) return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); + return new Dimension(new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertDimensionToString(EDataType eDataType, Object instanceValue) { + //return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) return null; + + return ""+ ((Dimension) (instanceValue)).width+":"+((Dimension) (instanceValue)).height; + } + + /** + * + * + * @generated NOT + */ + public RGB createRGBFromString(EDataType eDataType, String initialValue) { + //return (RGB)super.createFromString(eDataType, initialValue); + if (initialValue == null) return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); + return new RGB(new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertRGBToString(EDataType eDataType, Object instanceValue) { + //return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) return null; + + return ""+ ((RGB) (instanceValue)).red+":"+((RGB) (instanceValue)).green+":"+((RGB) (instanceValue)).blue; + } + + + + ////////////////// + //getType of Diagram + ///////////////////// + /** + * + * + * @NOT generated + */ + public String getType() { + if (this.type.equals("") ||this.type==null){ + return "ClassDiagram"; + } + return this.type; + } + + + /////////////////////////////////////////////////////////////////////////// + // Diagram Image.... + /////////////////////////////////////////////////////////////////////////// + /** + * This returns Diagram.gif. + * + * TODO code modified by RS for specific diagram display in di2.edit -> DiagramItemProvider + * + */ + @Override + public Object getImage(Object object) { + String typeDiagram = ((Diagram)object).getType(); + if(typeDiagram == null) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram")); + } + if( typeDiagram.equals("ActivityDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_ActivityDiagram")); + } + if( typeDiagram.equals("ClassDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_ClassDiagram")); + } + if( typeDiagram.equals("CompositeStructureDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_CompositeStructureDiagram")); + } + if( typeDiagram.equals("DeploymentDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_DeploymentDiagram")); + } + if( typeDiagram.equals("StateMachineDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_StateMachineDiagram")); + } + if( typeDiagram.equals("UseCaseDiagram")){ + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_UseCaseDiagram")); + } + + return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram")); + + } + + + \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/plugin.properties b/deprecated/org.eclipse.papyrus.conversion.di2/plugin.properties new file mode 100644 index 00000000000..cbf2f0234f4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/plugin.properties @@ -0,0 +1,13 @@ +################################################################################# +# Copyright (c) 2011 CEA LIST. +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Manel Fredj, Ansgar Radermacher - Initial API and implementation +################################################################################## +pluginName=Di2 model code +providerName=Eclipse Modeling Project + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/plugin.xml b/deprecated/org.eclipse.papyrus.conversion.di2/plugin.xml new file mode 100644 index 00000000000..ca7c3c3889a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/plugin.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java new file mode 100644 index 00000000000..97a55bc19fb --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java @@ -0,0 +1,19 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object ' + * Core Semantic Model Bridge'. + * + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getCoreSemanticModelBridge() + * @model + * @generated + */ +public interface CoreSemanticModelBridge extends SemanticModelBridge { +} // CoreSemanticModelBridge diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java new file mode 100644 index 00000000000..54c5e09e7a0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java @@ -0,0 +1,205 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.emf.ecore.EFactory; + +/** + * The Factory for the model. It provides a create method for each + * non-abstract class of the model. + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package + * @generated + */ +public interface Di2Factory extends EFactory { + + /** + * The singleton instance of the factory. + * + * @generated + */ + Di2Factory eINSTANCE = org.eclipse.papyrus.conversion.di2.impl.Di2FactoryImpl.init(); + + /** + * Returns a new object of class 'Diagram Element'. + * + * @return a new object of class 'Diagram Element'. + * @generated + */ + DiagramElement createDiagramElement(); + + /** + * Returns a new object of class 'Graph Element'. + * + * @return a new object of class 'Graph Element'. + * @generated + */ + GraphElement createGraphElement(); + + /** + * Returns a new object of class 'Reference'. + * + * @return a new object of class 'Reference'. + * @generated + */ + Reference createReference(); + + /** + * Returns a new object of class 'Property'. + * + * @return a new object of class 'Property'. + * @generated + */ + Property createProperty(); + + /** + * Returns a new object of class 'Graph Edge'. + * + * @return a new object of class 'Graph Edge'. + * @generated + */ + GraphEdge createGraphEdge(); + + /** + * Returns a new object of class 'Graph Connector'. + * + * @return a new object of class 'Graph Connector'. + * @generated + */ + GraphConnector createGraphConnector(); + + /** + * Returns a new object of class 'Graph Node'. + * + * @return a new object of class 'Graph Node'. + * @generated + */ + GraphNode createGraphNode(); + + /** + * Returns a new object of class 'Diagram Link'. + * + * @return a new object of class 'Diagram Link'. + * @generated + */ + DiagramLink createDiagramLink(); + + /** + * Returns a new object of class 'Diagram'. + * + * @return a new object of class 'Diagram'. + * @generated + */ + Diagram createDiagram(); + + /** + * Returns a new object of class 'Semantic Model Bridge'. + * + * @return a new object of class 'Semantic Model Bridge'. + * @generated + */ + SemanticModelBridge createSemanticModelBridge(); + + /** + * Returns a new object of class 'Simple Semantic Model Element'. + * + * @return a new object of class 'Simple Semantic Model Element'. + * @generated + */ + SimpleSemanticModelElement createSimpleSemanticModelElement(); + + /** + * Returns a new object of class 'Uml1 Semantic Model Bridge'. + * + * + * @return a new object of class 'Uml1 Semantic Model Bridge'. + * @generated + */ + Uml1SemanticModelBridge createUml1SemanticModelBridge(); + + /** + * Returns a new object of class 'Core Semantic Model Bridge'. + * + * + * @return a new object of class 'Core Semantic Model Bridge'. + * @generated + */ + CoreSemanticModelBridge createCoreSemanticModelBridge(); + + /** + * Returns a new object of class 'Leaf Element'. + * + * @return a new object of class 'Leaf Element'. + * @generated + */ + LeafElement createLeafElement(); + + /** + * Returns a new object of class 'Text Element'. + * + * @return a new object of class 'Text Element'. + * @generated + */ + TextElement createTextElement(); + + /** + * Returns a new object of class 'Image'. + * + * @return a new object of class 'Image'. + * @generated + */ + Image createImage(); + + /** + * Returns a new object of class 'Graphic Primitive'. + * + * @return a new object of class 'Graphic Primitive'. + * @generated + */ + GraphicPrimitive createGraphicPrimitive(); + + /** + * Returns a new object of class 'Polilyne'. + * + * @return a new object of class 'Polilyne'. + * @generated + */ + Polilyne createPolilyne(); + + /** + * Returns a new object of class 'Ellipse'. + * + * @return a new object of class 'Ellipse'. + * @generated + */ + Ellipse createEllipse(); + + /** + * Returns the package supported by this factory. + * + * @return the package supported by this factory. + * @generated + */ + Di2Package getDi2Package(); + +} // Di2Factory diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java new file mode 100644 index 00000000000..a92a4a0fe6c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java @@ -0,0 +1,4337 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * The Package for the model. It contains accessors for the meta + * objects to represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * + * @see org.eclipse.papyrus.conversion.di2.Di2Factory + * @model kind="package" + * @generated + */ +public interface Di2Package extends EPackage { + + /** + * The package name. + * + * @generated + */ + String eNAME = "di2"; + + /** + * The package namespace URI. + * + * @generated + */ + String eNS_URI = "http://www.papyrusuml.org/di2"; + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "di2"; + + /** + * The singleton instance of the package. + * + * @generated + */ + Di2Package eINSTANCE = org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl.init(); + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl + * Diagram Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramElement() + * @generated + */ + int DIAGRAM_ELEMENT = 0; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__PROPERTY = 0; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__IS_VISIBLE = 1; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__REFERENCE = 2; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__CONTAINER = 3; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__FONT_FAMILY = 4; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__FONT_SIZE = 5; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__LINE_STYLE = 6; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__LINE_THICKNESS = 7; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__FONT_COLOR = 8; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__FOREGROUND_COLOR = 9; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__BACKGROUND_COLOR = 10; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__BORDER_COLOR = 11; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__TRANSLUCENT = 12; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__SEMANTIC_PARENT = 13; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT__SEMANTIC_CHILD = 14; + + /** + * The number of structural features of the 'Diagram Element' class. + * + * @generated + * @ordered + */ + int DIAGRAM_ELEMENT_FEATURE_COUNT = 15; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl Graph Element}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphElement() + * @generated + */ + int GRAPH_ELEMENT = 1; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Contained' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__CONTAINED = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Link' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__LINK = DIAGRAM_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Semantic Model' containment reference. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__SEMANTIC_MODEL = DIAGRAM_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Position' attribute. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__POSITION = DIAGRAM_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Anchorage' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT__ANCHORAGE = DIAGRAM_ELEMENT_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Graph Element' class. + * + * @generated + * @ordered + */ + int GRAPH_ELEMENT_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 5; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl Reference}' class. + * + * + * @see org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getReference() + * @generated + */ + int REFERENCE = 2; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int REFERENCE__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int REFERENCE__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int REFERENCE__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int REFERENCE__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int REFERENCE__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int REFERENCE__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int REFERENCE__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int REFERENCE__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Is Individual Representation' attribute. + * + * @generated + * @ordered + */ + int REFERENCE__IS_INDIVIDUAL_REPRESENTATION = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Referenced' reference. + * + * @generated + * @ordered + */ + int REFERENCE__REFERENCED = DIAGRAM_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Reference' class. + * + * + * @generated + * @ordered + */ + int REFERENCE_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl + * Property}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.PropertyImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getProperty() + * @generated + */ + int PROPERTY = 3; + + /** + * The feature id for the 'Key' attribute. + * + * @generated + * @ordered + */ + int PROPERTY__KEY = 0; + + /** + * The feature id for the 'Value' attribute. + * + * @generated + * @ordered + */ + int PROPERTY__VALUE = 1; + + /** + * The number of structural features of the 'Property' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_FEATURE_COUNT = 2; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl Graph Edge}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphEdge() + * @generated + */ + int GRAPH_EDGE = 4; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__PROPERTY = GRAPH_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__IS_VISIBLE = GRAPH_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__REFERENCE = GRAPH_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__CONTAINER = GRAPH_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__FONT_FAMILY = GRAPH_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__FONT_SIZE = GRAPH_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__LINE_STYLE = GRAPH_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__LINE_THICKNESS = GRAPH_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__FONT_COLOR = GRAPH_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__FOREGROUND_COLOR = GRAPH_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__BACKGROUND_COLOR = GRAPH_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__BORDER_COLOR = GRAPH_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__TRANSLUCENT = GRAPH_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__SEMANTIC_PARENT = GRAPH_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__SEMANTIC_CHILD = GRAPH_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Contained' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__CONTAINED = GRAPH_ELEMENT__CONTAINED; + + /** + * The feature id for the 'Link' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__LINK = GRAPH_ELEMENT__LINK; + + /** + * The feature id for the 'Semantic Model' containment reference. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__SEMANTIC_MODEL = GRAPH_ELEMENT__SEMANTIC_MODEL; + + /** + * The feature id for the 'Position' attribute. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__POSITION = GRAPH_ELEMENT__POSITION; + + /** + * The feature id for the 'Anchorage' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__ANCHORAGE = GRAPH_ELEMENT__ANCHORAGE; + + /** + * The feature id for the 'Anchor' reference list. + * + * @generated + * @ordered + */ + int GRAPH_EDGE__ANCHOR = GRAPH_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Waypoints' attribute list. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE__WAYPOINTS = GRAPH_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Graph Edge' class. + * + * + * @generated + * @ordered + */ + int GRAPH_EDGE_FEATURE_COUNT = GRAPH_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl + * Graph Connector}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphConnector() + * @generated + */ + int GRAPH_CONNECTOR = 5; + + /** + * The feature id for the 'Position' attribute. + * + * @generated + * @ordered + */ + int GRAPH_CONNECTOR__POSITION = 0; + + /** + * The feature id for the 'Graph Edge' reference list. + * + * + * @generated + * @ordered + */ + int GRAPH_CONNECTOR__GRAPH_EDGE = 1; + + /** + * The feature id for the 'Graph Element' container reference. + * + * @generated + * @ordered + */ + int GRAPH_CONNECTOR__GRAPH_ELEMENT = 2; + + /** + * The number of structural features of the 'Graph Connector' class. + * + * @generated + * @ordered + */ + int GRAPH_CONNECTOR_FEATURE_COUNT = 3; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl Graph Node}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphNode() + * @generated + */ + int GRAPH_NODE = 6; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_NODE__PROPERTY = GRAPH_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__IS_VISIBLE = GRAPH_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE__REFERENCE = GRAPH_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int GRAPH_NODE__CONTAINER = GRAPH_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__FONT_FAMILY = GRAPH_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__FONT_SIZE = GRAPH_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__LINE_STYLE = GRAPH_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE__LINE_THICKNESS = GRAPH_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__FONT_COLOR = GRAPH_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE__FOREGROUND_COLOR = GRAPH_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE__BACKGROUND_COLOR = GRAPH_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__BORDER_COLOR = GRAPH_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__TRANSLUCENT = GRAPH_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE__SEMANTIC_PARENT = GRAPH_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int GRAPH_NODE__SEMANTIC_CHILD = GRAPH_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Contained' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_NODE__CONTAINED = GRAPH_ELEMENT__CONTAINED; + + /** + * The feature id for the 'Link' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_NODE__LINK = GRAPH_ELEMENT__LINK; + + /** + * The feature id for the 'Semantic Model' containment reference. + * + * @generated + * @ordered + */ + int GRAPH_NODE__SEMANTIC_MODEL = GRAPH_ELEMENT__SEMANTIC_MODEL; + + /** + * The feature id for the 'Position' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__POSITION = GRAPH_ELEMENT__POSITION; + + /** + * The feature id for the 'Anchorage' containment reference list. + * + * @generated + * @ordered + */ + int GRAPH_NODE__ANCHORAGE = GRAPH_ELEMENT__ANCHORAGE; + + /** + * The feature id for the 'Size' attribute. + * + * @generated + * @ordered + */ + int GRAPH_NODE__SIZE = GRAPH_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Graph Node' class. + * + * + * @generated + * @ordered + */ + int GRAPH_NODE_FEATURE_COUNT = GRAPH_ELEMENT_FEATURE_COUNT + 1; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl Diagram Link}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramLink() + * @generated + */ + int DIAGRAM_LINK = 7; + + /** + * The feature id for the 'Diagram' reference. + * + * @generated + * @ordered + */ + int DIAGRAM_LINK__DIAGRAM = 0; + + /** + * The feature id for the 'Zoom' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_LINK__ZOOM = 1; + + /** + * The feature id for the 'Viewport' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM_LINK__VIEWPORT = 2; + + /** + * The feature id for the 'Graph Element' reference. + * + * + * @generated + * @ordered + */ + int DIAGRAM_LINK__GRAPH_ELEMENT = 3; + + /** + * The number of structural features of the 'Diagram Link' class. + * + * @generated + * @ordered + */ + int DIAGRAM_LINK_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl + * Diagram}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagram() + * @generated + */ + int DIAGRAM = 8; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int DIAGRAM__PROPERTY = GRAPH_NODE__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__IS_VISIBLE = GRAPH_NODE__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int DIAGRAM__REFERENCE = GRAPH_NODE__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int DIAGRAM__CONTAINER = GRAPH_NODE__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__FONT_FAMILY = GRAPH_NODE__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__FONT_SIZE = GRAPH_NODE__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__LINE_STYLE = GRAPH_NODE__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM__LINE_THICKNESS = GRAPH_NODE__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__FONT_COLOR = GRAPH_NODE__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM__FOREGROUND_COLOR = GRAPH_NODE__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int DIAGRAM__BACKGROUND_COLOR = GRAPH_NODE__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__BORDER_COLOR = GRAPH_NODE__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__TRANSLUCENT = GRAPH_NODE__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int DIAGRAM__SEMANTIC_PARENT = GRAPH_NODE__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int DIAGRAM__SEMANTIC_CHILD = GRAPH_NODE__SEMANTIC_CHILD; + + /** + * The feature id for the 'Contained' containment reference list. + * + * @generated + * @ordered + */ + int DIAGRAM__CONTAINED = GRAPH_NODE__CONTAINED; + + /** + * The feature id for the 'Link' containment reference list. + * + * @generated + * @ordered + */ + int DIAGRAM__LINK = GRAPH_NODE__LINK; + + /** + * The feature id for the 'Semantic Model' containment reference. + * + * @generated + * @ordered + */ + int DIAGRAM__SEMANTIC_MODEL = GRAPH_NODE__SEMANTIC_MODEL; + + /** + * The feature id for the 'Position' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__POSITION = GRAPH_NODE__POSITION; + + /** + * The feature id for the 'Anchorage' containment reference list. + * + * @generated + * @ordered + */ + int DIAGRAM__ANCHORAGE = GRAPH_NODE__ANCHORAGE; + + /** + * The feature id for the 'Size' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__SIZE = GRAPH_NODE__SIZE; + + /** + * The feature id for the 'Owner' containment reference. + * + * + * @generated + * @ordered + */ + int DIAGRAM__OWNER = GRAPH_NODE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__NAME = GRAPH_NODE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Zoom' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__ZOOM = GRAPH_NODE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Viewport' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__VIEWPORT = GRAPH_NODE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Diagram Link' reference list. + * + * + * @generated + * @ordered + */ + int DIAGRAM__DIAGRAM_LINK = GRAPH_NODE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Type' attribute. + * + * @generated + * @ordered + */ + int DIAGRAM__TYPE = GRAPH_NODE_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Diagram' class. + * + * + * @generated + * @ordered + */ + int DIAGRAM_FEATURE_COUNT = GRAPH_NODE_FEATURE_COUNT + 6; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl + * Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSemanticModelBridge() + * @generated + */ + int SEMANTIC_MODEL_BRIDGE = 9; + + /** + * The feature id for the 'Presentation' attribute. + * + * @generated + * @ordered + */ + int SEMANTIC_MODEL_BRIDGE__PRESENTATION = 0; + + /** + * The feature id for the 'Graph Element' reference. + * + * + * @generated + * @ordered + */ + int SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = 1; + + /** + * The number of structural features of the 'Semantic Model Bridge' class. + * + * @generated + * @ordered + */ + int SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = 2; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl + * Simple Semantic Model Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSimpleSemanticModelElement() + * @generated + */ + int SIMPLE_SEMANTIC_MODEL_ELEMENT = 10; + + /** + * The feature id for the 'Presentation' attribute. + * + * @generated + * @ordered + */ + int SIMPLE_SEMANTIC_MODEL_ELEMENT__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; + + /** + * The feature id for the 'Graph Element' reference. + * + * + * @generated + * @ordered + */ + int SIMPLE_SEMANTIC_MODEL_ELEMENT__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; + + /** + * The feature id for the 'Typeinfo' attribute. + * + * @generated + * @ordered + */ + int SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Simple Semantic Model Element' class. + * + * @generated + * @ordered + */ + int SIMPLE_SEMANTIC_MODEL_ELEMENT_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 1; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl + * Uml1 Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getUml1SemanticModelBridge() + * @generated + */ + int UML1_SEMANTIC_MODEL_BRIDGE = 11; + + /** + * The feature id for the 'Presentation' attribute. + * + * @generated + * @ordered + */ + int UML1_SEMANTIC_MODEL_BRIDGE__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; + + /** + * The feature id for the 'Graph Element' reference. + * + * + * @generated + * @ordered + */ + int UML1_SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; + + /** + * The feature id for the 'Element' reference. + * + * @generated + * @ordered + */ + int UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Uml1 Semantic Model Bridge' class. + * + * @generated + * @ordered + */ + int UML1_SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 1; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl + * Core Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getCoreSemanticModelBridge() + * @generated + */ + int CORE_SEMANTIC_MODEL_BRIDGE = 12; + + /** + * The feature id for the 'Presentation' attribute. + * + * @generated + * @ordered + */ + int CORE_SEMANTIC_MODEL_BRIDGE__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; + + /** + * The feature id for the 'Graph Element' reference. + * + * + * @generated + * @ordered + */ + int CORE_SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; + + /** + * The number of structural features of the 'Core Semantic Model Bridge' class. + * + * @generated + * @ordered + */ + int CORE_SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl Leaf Element}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getLeafElement() + * @generated + */ + int LEAF_ELEMENT = 13; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; + + /** + * The number of structural features of the 'Leaf Element' class. + * + * @generated + * @ordered + */ + int LEAF_ELEMENT_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl Text Element}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.TextElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getTextElement() + * @generated + */ + int TEXT_ELEMENT = 14; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__PROPERTY = LEAF_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__REFERENCE = LEAF_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__CONTAINER = LEAF_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Text' attribute. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT__TEXT = LEAF_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Text Element' class. + * + * @generated + * @ordered + */ + int TEXT_ELEMENT_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl + * Image}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.ImageImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getImage() + * @generated + */ + int IMAGE = 15; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int IMAGE__PROPERTY = LEAF_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int IMAGE__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int IMAGE__REFERENCE = LEAF_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int IMAGE__CONTAINER = LEAF_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int IMAGE__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int IMAGE__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int IMAGE__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int IMAGE__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int IMAGE__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int IMAGE__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int IMAGE__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int IMAGE__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; + + /** + * The feature id for the 'Uri' attribute. + * + * @generated + * @ordered + */ + int IMAGE__URI = LEAF_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Mime Type' attribute. + * + * @generated + * @ordered + */ + int IMAGE__MIME_TYPE = LEAF_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Image' class. + * + * @generated + * @ordered + */ + int IMAGE_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl + * Graphic Primitive}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphicPrimitive() + * @generated + */ + int GRAPHIC_PRIMITIVE = 16; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__PROPERTY = LEAF_ELEMENT__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__REFERENCE = LEAF_ELEMENT__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__CONTAINER = LEAF_ELEMENT__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; + + /** + * The number of structural features of the 'Graphic Primitive' class. + * + * @generated + * @ordered + */ + int GRAPHIC_PRIMITIVE_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl + * Polilyne}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPolilyne() + * @generated + */ + int POLILYNE = 17; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int POLILYNE__PROPERTY = GRAPHIC_PRIMITIVE__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__IS_VISIBLE = GRAPHIC_PRIMITIVE__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int POLILYNE__REFERENCE = GRAPHIC_PRIMITIVE__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int POLILYNE__CONTAINER = GRAPHIC_PRIMITIVE__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__FONT_FAMILY = GRAPHIC_PRIMITIVE__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__FONT_SIZE = GRAPHIC_PRIMITIVE__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__LINE_STYLE = GRAPHIC_PRIMITIVE__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int POLILYNE__LINE_THICKNESS = GRAPHIC_PRIMITIVE__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__FONT_COLOR = GRAPHIC_PRIMITIVE__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int POLILYNE__FOREGROUND_COLOR = GRAPHIC_PRIMITIVE__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int POLILYNE__BACKGROUND_COLOR = GRAPHIC_PRIMITIVE__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__BORDER_COLOR = GRAPHIC_PRIMITIVE__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int POLILYNE__TRANSLUCENT = GRAPHIC_PRIMITIVE__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int POLILYNE__SEMANTIC_PARENT = GRAPHIC_PRIMITIVE__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int POLILYNE__SEMANTIC_CHILD = GRAPHIC_PRIMITIVE__SEMANTIC_CHILD; + + /** + * The feature id for the 'Waypoints' attribute list. + * + * + * @generated + * @ordered + */ + int POLILYNE__WAYPOINTS = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Closed' attribute list. + * + * @generated + * @ordered + */ + int POLILYNE__CLOSED = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Polilyne' class. + * + * + * @generated + * @ordered + */ + int POLILYNE_FEATURE_COUNT = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl + * Ellipse}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.EllipseImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getEllipse() + * @generated + */ + int ELLIPSE = 18; + + /** + * The feature id for the 'Property' containment reference list. + * + * @generated + * @ordered + */ + int ELLIPSE__PROPERTY = GRAPHIC_PRIMITIVE__PROPERTY; + + /** + * The feature id for the 'Is Visible' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__IS_VISIBLE = GRAPHIC_PRIMITIVE__IS_VISIBLE; + + /** + * The feature id for the 'Reference' reference list. + * + * + * @generated + * @ordered + */ + int ELLIPSE__REFERENCE = GRAPHIC_PRIMITIVE__REFERENCE; + + /** + * The feature id for the 'Container' container reference. + * + * @generated + * @ordered + */ + int ELLIPSE__CONTAINER = GRAPHIC_PRIMITIVE__CONTAINER; + + /** + * The feature id for the 'Font Family' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__FONT_FAMILY = GRAPHIC_PRIMITIVE__FONT_FAMILY; + + /** + * The feature id for the 'Font Size' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__FONT_SIZE = GRAPHIC_PRIMITIVE__FONT_SIZE; + + /** + * The feature id for the 'Line Style' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__LINE_STYLE = GRAPHIC_PRIMITIVE__LINE_STYLE; + + /** + * The feature id for the 'Line Thickness' attribute. + * + * + * @generated + * @ordered + */ + int ELLIPSE__LINE_THICKNESS = GRAPHIC_PRIMITIVE__LINE_THICKNESS; + + /** + * The feature id for the 'Font Color' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__FONT_COLOR = GRAPHIC_PRIMITIVE__FONT_COLOR; + + /** + * The feature id for the 'Foreground Color' attribute. + * + * + * @generated + * @ordered + */ + int ELLIPSE__FOREGROUND_COLOR = GRAPHIC_PRIMITIVE__FOREGROUND_COLOR; + + /** + * The feature id for the 'Background Color' attribute. + * + * + * @generated + * @ordered + */ + int ELLIPSE__BACKGROUND_COLOR = GRAPHIC_PRIMITIVE__BACKGROUND_COLOR; + + /** + * The feature id for the 'Border Color' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__BORDER_COLOR = GRAPHIC_PRIMITIVE__BORDER_COLOR; + + /** + * The feature id for the 'Translucent' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__TRANSLUCENT = GRAPHIC_PRIMITIVE__TRANSLUCENT; + + /** + * The feature id for the 'Semantic Parent' reference. + * + * + * @generated + * @ordered + */ + int ELLIPSE__SEMANTIC_PARENT = GRAPHIC_PRIMITIVE__SEMANTIC_PARENT; + + /** + * The feature id for the 'Semantic Child' reference list. + * + * @generated + * @ordered + */ + int ELLIPSE__SEMANTIC_CHILD = GRAPHIC_PRIMITIVE__SEMANTIC_CHILD; + + /** + * The feature id for the 'Center' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__CENTER = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Radius X' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__RADIUS_X = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Radius Y' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__RADIUS_Y = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Rotation' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__ROTATION = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Start Angle' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__START_ANGLE = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'End Angle' attribute. + * + * @generated + * @ordered + */ + int ELLIPSE__END_ANGLE = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Ellipse' class. + * + * + * @generated + * @ordered + */ + int ELLIPSE_FEATURE_COUNT = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 6; + + /** + * The meta object id for the ' + * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * Papyrus Key Enumeration}' enum. + * + * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPapyrusKeyEnumeration() + * @generated + */ + int PAPYRUS_KEY_ENUMERATION = 19; + + /** + * The meta object id for the 'Point' data type. + * + * @see org.eclipse.draw2d.geometry.Point + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPoint() + * @generated + */ + int POINT = 20; + + /** + * The meta object id for the 'Dimension' data type. + * + * @see org.eclipse.draw2d.geometry.Dimension + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDimension() + * @generated + */ + int DIMENSION = 21; + + /** + * The meta object id for the 'Double' data type. + * + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDouble() + * @generated + */ + int DOUBLE = 22; + + /** + * The meta object id for the 'RGB' data type. + * + * @see org.eclipse.swt.graphics.RGB + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getRGB() + * @generated + */ + int RGB = 23; + + /** + * The meta object id for the 'String' data type. + * + * @see java.lang.String + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getString() + * @generated + */ + int STRING = 24; + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement Diagram Element}'. + * + * + * @return the meta object for class 'Diagram Element'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement + * @generated + */ + EClass getDiagramElement(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty Property} + * '. + * + * @return the meta object for the containment reference list 'Property'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty() + * @see #getDiagramElement() + * @generated + */ + EReference getDiagramElement_Property(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible + * Is Visible}'. + * + * @return the meta object for the attribute 'Is Visible'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_IsVisible(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getReference + * Reference}'. + * + * @return the meta object for the reference list 'Reference'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getReference() + * @see #getDiagramElement() + * @generated + */ + EReference getDiagramElement_Reference(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer + * Container}'. + * + * @return the meta object for the container reference 'Container'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer() + * @see #getDiagramElement() + * @generated + */ + EReference getDiagramElement_Container(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily + * Font Family}'. + * + * @return the meta object for the attribute 'Font Family'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_FontFamily(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} + * '. + * + * @return the meta object for the attribute 'Font Size'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_FontSize(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle + * Line Style}'. + * + * @return the meta object for the attribute 'Line Style'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_LineStyle(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness + * Line Thickness}'. + * + * @return the meta object for the attribute 'Line Thickness'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_LineThickness(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor + * Font Color}'. + * + * @return the meta object for the attribute 'Font Color'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_FontColor(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor + * Foreground Color}'. + * + * @return the meta object for the attribute 'Foreground Color'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_ForegroundColor(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor + * Background Color}'. + * + * @return the meta object for the attribute 'Background Color'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_BackgroundColor(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor + * Border Color}'. + * + * @return the meta object for the attribute 'Border Color'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_BorderColor(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent + * Translucent}'. + * + * @return the meta object for the attribute 'Translucent'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent() + * @see #getDiagramElement() + * @generated + */ + EAttribute getDiagramElement_Translucent(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent + * Semantic Parent}'. + * + * @return the meta object for the reference 'Semantic Parent'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent() + * @see #getDiagramElement() + * @generated + */ + EReference getDiagramElement_SemanticParent(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild + * Semantic Child}'. + * + * @return the meta object for the reference list 'Semantic Child'. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild() + * @see #getDiagramElement() + * @generated + */ + EReference getDiagramElement_SemanticChild(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement Graph Element}'. + * + * @return the meta object for class 'Graph Element'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement + * @generated + */ + EClass getGraphElement(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained} + * '. + * + * @return the meta object for the containment reference list 'Contained'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getContained() + * @see #getGraphElement() + * @generated + */ + EReference getGraphElement_Contained(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getLink Link}'. + * + * @return the meta object for the containment reference list 'Link'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getLink() + * @see #getGraphElement() + * @generated + */ + EReference getGraphElement_Link(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel + * Semantic Model}'. + * + * @return the meta object for the containment reference 'Semantic Model'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel() + * @see #getGraphElement() + * @generated + */ + EReference getGraphElement_SemanticModel(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}'. + * + * + * @return the meta object for the attribute 'Position'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getPosition() + * @see #getGraphElement() + * @generated + */ + EAttribute getGraphElement_Position(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage} + * '. + * + * @return the meta object for the containment reference list 'Anchorage'. + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage() + * @see #getGraphElement() + * @generated + */ + EReference getGraphElement_Anchorage(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Reference + * Reference}'. + * + * @return the meta object for class 'Reference'. + * @see org.eclipse.papyrus.conversion.di2.Reference + * @generated + */ + EClass getReference(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation + * Is Individual Representation}'. + * + * @return the meta object for the attribute 'Is Individual Representation'. + * @see org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation() + * @see #getReference() + * @generated + */ + EAttribute getReference_IsIndividualRepresentation(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}'. + * + * + * @return the meta object for the reference 'Referenced'. + * @see org.eclipse.papyrus.conversion.di2.Reference#getReferenced() + * @see #getReference() + * @generated + */ + EReference getReference_Referenced(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Property + * Property}'. + * + * @return the meta object for class 'Property'. + * @see org.eclipse.papyrus.conversion.di2.Property + * @generated + */ + EClass getProperty(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Property#getKey Key}'. + * + * @return the meta object for the attribute 'Key'. + * @see org.eclipse.papyrus.conversion.di2.Property#getKey() + * @see #getProperty() + * @generated + */ + EAttribute getProperty_Key(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Property#getValue Value}'. + * + * @return the meta object for the attribute 'Value'. + * @see org.eclipse.papyrus.conversion.di2.Property#getValue() + * @see #getProperty() + * @generated + */ + EAttribute getProperty_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.GraphEdge + * Graph Edge}'. + * + * @return the meta object for class 'Graph Edge'. + * @see org.eclipse.papyrus.conversion.di2.GraphEdge + * @generated + */ + EClass getGraphEdge(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor Anchor}'. + * + * @return the meta object for the reference list 'Anchor'. + * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor() + * @see #getGraphEdge() + * @generated + */ + EReference getGraphEdge_Anchor(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints Waypoints}'. + * + * + * @return the meta object for the attribute list 'Waypoints'. + * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints() + * @see #getGraphEdge() + * @generated + */ + EAttribute getGraphEdge_Waypoints(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector Graph Connector}'. + * + * + * @return the meta object for class 'Graph Connector'. + * @see org.eclipse.papyrus.conversion.di2.GraphConnector + * @generated + */ + EClass getGraphConnector(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position} + * '. + * + * @return the meta object for the attribute 'Position'. + * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition() + * @see #getGraphConnector() + * @generated + */ + EAttribute getGraphConnector_Position(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge + * Graph Edge}'. + * + * @return the meta object for the reference list 'Graph Edge'. + * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge() + * @see #getGraphConnector() + * @generated + */ + EReference getGraphConnector_GraphEdge(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement + * Graph Element}'. + * + * @return the meta object for the container reference 'Graph Element'. + * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement() + * @see #getGraphConnector() + * @generated + */ + EReference getGraphConnector_GraphElement(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.GraphNode + * Graph Node}'. + * + * @return the meta object for class 'Graph Node'. + * @see org.eclipse.papyrus.conversion.di2.GraphNode + * @generated + */ + EClass getGraphNode(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize Size}'. + * + * @return the meta object for the attribute 'Size'. + * @see org.eclipse.papyrus.conversion.di2.GraphNode#getSize() + * @see #getGraphNode() + * @generated + */ + EAttribute getGraphNode_Size(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink Diagram Link}'. + * + * @return the meta object for class 'Diagram Link'. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink + * @generated + */ + EClass getDiagramLink(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram Diagram}'. + * + * + * @return the meta object for the reference 'Diagram'. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram() + * @see #getDiagramLink() + * @generated + */ + EReference getDiagramLink_Diagram(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom Zoom}'. + * + * @return the meta object for the attribute 'Zoom'. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom() + * @see #getDiagramLink() + * @generated + */ + EAttribute getDiagramLink_Zoom(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}'. + * + * + * @return the meta object for the attribute 'Viewport'. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport() + * @see #getDiagramLink() + * @generated + */ + EAttribute getDiagramLink_Viewport(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement + * Graph Element}'. + * + * @return the meta object for the reference 'Graph Element'. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement() + * @see #getDiagramLink() + * @generated + */ + EReference getDiagramLink_GraphElement(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Diagram + * Diagram}'. + * + * @return the meta object for class 'Diagram'. + * @see org.eclipse.papyrus.conversion.di2.Diagram + * @generated + */ + EClass getDiagram(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner Owner}'. + * + * @return the meta object for the containment reference 'Owner'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getOwner() + * @see #getDiagram() + * @generated + */ + EReference getDiagram_Owner(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getName() + * @see #getDiagram() + * @generated + */ + EAttribute getDiagram_Name(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom Zoom}'. + * + * @return the meta object for the attribute 'Zoom'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getZoom() + * @see #getDiagram() + * @generated + */ + EAttribute getDiagram_Zoom(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport Viewport}'. + * + * @return the meta object for the attribute 'Viewport'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getViewport() + * @see #getDiagram() + * @generated + */ + EAttribute getDiagram_Viewport(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink Diagram Link} + * '. + * + * @return the meta object for the reference list 'Diagram Link'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink() + * @see #getDiagram() + * @generated + */ + EReference getDiagram_DiagramLink(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram#getType Type}'. + * + * @return the meta object for the attribute 'Type'. + * @see org.eclipse.papyrus.conversion.di2.Diagram#getType() + * @see #getDiagram() + * @generated + */ + EAttribute getDiagram_Type(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge + * Semantic Model Bridge}'. + * + * @return the meta object for class 'Semantic Model Bridge'. + * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge + * @generated + */ + EClass getSemanticModelBridge(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation + * Presentation}'. + * + * @return the meta object for the attribute 'Presentation'. + * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation() + * @see #getSemanticModelBridge() + * @generated + */ + EAttribute getSemanticModelBridge_Presentation(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement + * Graph Element}'. + * + * @return the meta object for the reference 'Graph Element'. + * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement() + * @see #getSemanticModelBridge() + * @generated + */ + EReference getSemanticModelBridge_GraphElement(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement + * Simple Semantic Model Element}'. + * + * @return the meta object for class 'Simple Semantic Model Element'. + * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement + * @generated + */ + EClass getSimpleSemanticModelElement(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo + * Typeinfo}'. + * + * @return the meta object for the attribute 'Typeinfo'. + * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo() + * @see #getSimpleSemanticModelElement() + * @generated + */ + EAttribute getSimpleSemanticModelElement_Typeinfo(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge + * Uml1 Semantic Model Bridge}'. + * + * @return the meta object for class 'Uml1 Semantic Model Bridge'. + * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge + * @generated + */ + EClass getUml1SemanticModelBridge(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement + * Element}'. + * + * @return the meta object for the reference 'Element'. + * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement() + * @see #getUml1SemanticModelBridge() + * @generated + */ + EReference getUml1SemanticModelBridge_Element(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge + * Core Semantic Model Bridge}'. + * + * @return the meta object for class 'Core Semantic Model Bridge'. + * @see org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge + * @generated + */ + EClass getCoreSemanticModelBridge(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.LeafElement Leaf Element}'. + * + * @return the meta object for class 'Leaf Element'. + * @see org.eclipse.papyrus.conversion.di2.LeafElement + * @generated + */ + EClass getLeafElement(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.TextElement Text Element}'. + * + * @return the meta object for class 'Text Element'. + * @see org.eclipse.papyrus.conversion.di2.TextElement + * @generated + */ + EClass getTextElement(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.TextElement#getText Text}'. + * + * @return the meta object for the attribute 'Text'. + * @see org.eclipse.papyrus.conversion.di2.TextElement#getText() + * @see #getTextElement() + * @generated + */ + EAttribute getTextElement_Text(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Image + * Image}'. + * + * @return the meta object for class 'Image'. + * @see org.eclipse.papyrus.conversion.di2.Image + * @generated + */ + EClass getImage(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Image#getUri Uri}'. + * + * @return the meta object for the attribute 'Uri'. + * @see org.eclipse.papyrus.conversion.di2.Image#getUri() + * @see #getImage() + * @generated + */ + EAttribute getImage_Uri(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Image#getMimeType Mime Type}'. + * + * @return the meta object for the attribute 'Mime Type'. + * @see org.eclipse.papyrus.conversion.di2.Image#getMimeType() + * @see #getImage() + * @generated + */ + EAttribute getImage_MimeType(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphicPrimitive Graphic Primitive}'. + * + * + * @return the meta object for class 'Graphic Primitive'. + * @see org.eclipse.papyrus.conversion.di2.GraphicPrimitive + * @generated + */ + EClass getGraphicPrimitive(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Polilyne + * Polilyne}'. + * + * @return the meta object for class 'Polilyne'. + * @see org.eclipse.papyrus.conversion.di2.Polilyne + * @generated + */ + EClass getPolilyne(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints Waypoints}'. + * + * + * @return the meta object for the attribute list 'Waypoints'. + * @see org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints() + * @see #getPolilyne() + * @generated + */ + EAttribute getPolilyne_Waypoints(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.papyrus.conversion.di2.Polilyne#getClosed Closed}'. + * + * @return the meta object for the attribute list 'Closed'. + * @see org.eclipse.papyrus.conversion.di2.Polilyne#getClosed() + * @see #getPolilyne() + * @generated + */ + EAttribute getPolilyne_Closed(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Ellipse + * Ellipse}'. + * + * @return the meta object for class 'Ellipse'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse + * @generated + */ + EClass getEllipse(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter Center}'. + * + * @return the meta object for the attribute 'Center'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getCenter() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_Center(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX Radius X}'. + * + * @return the meta object for the attribute 'Radius X'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_RadiusX(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY Radius Y}'. + * + * @return the meta object for the attribute 'Radius Y'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_RadiusY(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation Rotation}'. + * + * @return the meta object for the attribute 'Rotation'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRotation() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_Rotation(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle Start Angle}'. + * + * + * @return the meta object for the attribute 'Start Angle'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_StartAngle(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle End Angle}'. + * + * @return the meta object for the attribute 'End Angle'. + * @see org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle() + * @see #getEllipse() + * @generated + */ + EAttribute getEllipse_EndAngle(); + + /** + * Returns the meta object for enum ' + * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * Papyrus Key Enumeration}'. + * + * @return the meta object for enum 'Papyrus Key Enumeration'. + * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * @generated + */ + EEnum getPapyrusKeyEnumeration(); + + /** + * Returns the meta object for data type '{@link org.eclipse.draw2d.geometry.Point + * Point}'. + * + * @return the meta object for data type 'Point'. + * @see org.eclipse.draw2d.geometry.Point + * @model instanceClass="org.eclipse.draw2d.geometry.Point" + * @generated + */ + EDataType getPoint(); + + /** + * Returns the meta object for data type '{@link org.eclipse.draw2d.geometry.Dimension + * Dimension}'. + * + * @return the meta object for data type 'Dimension'. + * @see org.eclipse.draw2d.geometry.Dimension + * @model instanceClass="org.eclipse.draw2d.geometry.Dimension" + * @generated + */ + EDataType getDimension(); + + /** + * Returns the meta object for data type 'Double'. + * + * @return the meta object for data type 'Double'. + * @model instanceClass="double" + * @generated + */ + EDataType getDouble(); + + /** + * Returns the meta object for data type '{@link org.eclipse.swt.graphics.RGB RGB}'. + * + * + * @return the meta object for data type 'RGB'. + * @see org.eclipse.swt.graphics.RGB + * @model instanceClass="org.eclipse.swt.graphics.RGB" + * @generated + */ + EDataType getRGB(); + + /** + * Returns the meta object for data type '{@link java.lang.String String}'. + * + * @return the meta object for data type 'String'. + * @see java.lang.String + * @model instanceClass="java.lang.String" + * @generated + */ + EDataType getString(); + + /** + * Returns the factory that creates the instances of the model. + * + * @return the factory that creates the instances of the model. + * @generated + */ + Di2Factory getDi2Factory(); + + /** + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * + * @generated + */ + interface Literals { + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl + * Diagram Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramElement() + * @generated + */ + EClass DIAGRAM_ELEMENT = eINSTANCE.getDiagramElement(); + + /** + * The meta object literal for the 'Property' containment reference list + * feature. + * + * @generated + */ + EReference DIAGRAM_ELEMENT__PROPERTY = eINSTANCE.getDiagramElement_Property(); + + /** + * The meta object literal for the 'Is Visible' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__IS_VISIBLE = eINSTANCE.getDiagramElement_IsVisible(); + + /** + * The meta object literal for the 'Reference' reference list feature. + * + * @generated + */ + EReference DIAGRAM_ELEMENT__REFERENCE = eINSTANCE.getDiagramElement_Reference(); + + /** + * The meta object literal for the 'Container' container reference feature. + * + * + * @generated + */ + EReference DIAGRAM_ELEMENT__CONTAINER = eINSTANCE.getDiagramElement_Container(); + + /** + * The meta object literal for the 'Font Family' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__FONT_FAMILY = eINSTANCE.getDiagramElement_FontFamily(); + + /** + * The meta object literal for the 'Font Size' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__FONT_SIZE = eINSTANCE.getDiagramElement_FontSize(); + + /** + * The meta object literal for the 'Line Style' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__LINE_STYLE = eINSTANCE.getDiagramElement_LineStyle(); + + /** + * The meta object literal for the 'Line Thickness' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__LINE_THICKNESS = eINSTANCE.getDiagramElement_LineThickness(); + + /** + * The meta object literal for the 'Font Color' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__FONT_COLOR = eINSTANCE.getDiagramElement_FontColor(); + + /** + * The meta object literal for the 'Foreground Color' attribute feature. + * + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__FOREGROUND_COLOR = eINSTANCE.getDiagramElement_ForegroundColor(); + + /** + * The meta object literal for the 'Background Color' attribute feature. + * + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__BACKGROUND_COLOR = eINSTANCE.getDiagramElement_BackgroundColor(); + + /** + * The meta object literal for the 'Border Color' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__BORDER_COLOR = eINSTANCE.getDiagramElement_BorderColor(); + + /** + * The meta object literal for the 'Translucent' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_ELEMENT__TRANSLUCENT = eINSTANCE.getDiagramElement_Translucent(); + + /** + * The meta object literal for the 'Semantic Parent' reference feature. + * + * @generated + */ + EReference DIAGRAM_ELEMENT__SEMANTIC_PARENT = eINSTANCE.getDiagramElement_SemanticParent(); + + /** + * The meta object literal for the 'Semantic Child' reference list feature. + * + * + * @generated + */ + EReference DIAGRAM_ELEMENT__SEMANTIC_CHILD = eINSTANCE.getDiagramElement_SemanticChild(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl + * Graph Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphElement() + * @generated + */ + EClass GRAPH_ELEMENT = eINSTANCE.getGraphElement(); + + /** + * The meta object literal for the 'Contained' containment reference list + * feature. + * + * @generated + */ + EReference GRAPH_ELEMENT__CONTAINED = eINSTANCE.getGraphElement_Contained(); + + /** + * The meta object literal for the 'Link' containment reference list + * feature. + * + * @generated + */ + EReference GRAPH_ELEMENT__LINK = eINSTANCE.getGraphElement_Link(); + + /** + * The meta object literal for the 'Semantic Model' containment reference + * feature. + * + * @generated + */ + EReference GRAPH_ELEMENT__SEMANTIC_MODEL = eINSTANCE.getGraphElement_SemanticModel(); + + /** + * The meta object literal for the 'Position' attribute feature. + * + * @generated + */ + EAttribute GRAPH_ELEMENT__POSITION = eINSTANCE.getGraphElement_Position(); + + /** + * The meta object literal for the 'Anchorage' containment reference list + * feature. + * + * @generated + */ + EReference GRAPH_ELEMENT__ANCHORAGE = eINSTANCE.getGraphElement_Anchorage(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl Reference}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getReference() + * @generated + */ + EClass REFERENCE = eINSTANCE.getReference(); + + /** + * The meta object literal for the 'Is Individual Representation' attribute + * feature. + * + * @generated + */ + EAttribute REFERENCE__IS_INDIVIDUAL_REPRESENTATION = eINSTANCE.getReference_IsIndividualRepresentation(); + + /** + * The meta object literal for the 'Referenced' reference feature. + * + * @generated + */ + EReference REFERENCE__REFERENCED = eINSTANCE.getReference_Referenced(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl Property}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.PropertyImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getProperty() + * @generated + */ + EClass PROPERTY = eINSTANCE.getProperty(); + + /** + * The meta object literal for the 'Key' attribute feature. + * + * @generated + */ + EAttribute PROPERTY__KEY = eINSTANCE.getProperty_Key(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * @generated + */ + EAttribute PROPERTY__VALUE = eINSTANCE.getProperty_Value(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl Graph Edge}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphEdge() + * @generated + */ + EClass GRAPH_EDGE = eINSTANCE.getGraphEdge(); + + /** + * The meta object literal for the 'Anchor' reference list feature. + * + * @generated + */ + EReference GRAPH_EDGE__ANCHOR = eINSTANCE.getGraphEdge_Anchor(); + + /** + * The meta object literal for the 'Waypoints' attribute list feature. + * + * @generated + */ + EAttribute GRAPH_EDGE__WAYPOINTS = eINSTANCE.getGraphEdge_Waypoints(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl + * Graph Connector}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphConnector() + * @generated + */ + EClass GRAPH_CONNECTOR = eINSTANCE.getGraphConnector(); + + /** + * The meta object literal for the 'Position' attribute feature. + * + * @generated + */ + EAttribute GRAPH_CONNECTOR__POSITION = eINSTANCE.getGraphConnector_Position(); + + /** + * The meta object literal for the 'Graph Edge' reference list feature. + * + * @generated + */ + EReference GRAPH_CONNECTOR__GRAPH_EDGE = eINSTANCE.getGraphConnector_GraphEdge(); + + /** + * The meta object literal for the 'Graph Element' container reference + * feature. + * + * @generated + */ + EReference GRAPH_CONNECTOR__GRAPH_ELEMENT = eINSTANCE.getGraphConnector_GraphElement(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl Graph Node}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphNode() + * @generated + */ + EClass GRAPH_NODE = eINSTANCE.getGraphNode(); + + /** + * The meta object literal for the 'Size' attribute feature. + * + * @generated + */ + EAttribute GRAPH_NODE__SIZE = eINSTANCE.getGraphNode_Size(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl + * Diagram Link}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramLink() + * @generated + */ + EClass DIAGRAM_LINK = eINSTANCE.getDiagramLink(); + + /** + * The meta object literal for the 'Diagram' reference feature. + * + * @generated + */ + EReference DIAGRAM_LINK__DIAGRAM = eINSTANCE.getDiagramLink_Diagram(); + + /** + * The meta object literal for the 'Zoom' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_LINK__ZOOM = eINSTANCE.getDiagramLink_Zoom(); + + /** + * The meta object literal for the 'Viewport' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM_LINK__VIEWPORT = eINSTANCE.getDiagramLink_Viewport(); + + /** + * The meta object literal for the 'Graph Element' reference feature. + * + * @generated + */ + EReference DIAGRAM_LINK__GRAPH_ELEMENT = eINSTANCE.getDiagramLink_GraphElement(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl Diagram}' class. + * + * + * @see org.eclipse.papyrus.conversion.di2.impl.DiagramImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagram() + * @generated + */ + EClass DIAGRAM = eINSTANCE.getDiagram(); + + /** + * The meta object literal for the 'Owner' containment reference feature. + * + * + * @generated + */ + EReference DIAGRAM__OWNER = eINSTANCE.getDiagram_Owner(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM__NAME = eINSTANCE.getDiagram_Name(); + + /** + * The meta object literal for the 'Zoom' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM__ZOOM = eINSTANCE.getDiagram_Zoom(); + + /** + * The meta object literal for the 'Viewport' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM__VIEWPORT = eINSTANCE.getDiagram_Viewport(); + + /** + * The meta object literal for the 'Diagram Link' reference list feature. + * + * + * @generated + */ + EReference DIAGRAM__DIAGRAM_LINK = eINSTANCE.getDiagram_DiagramLink(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * @generated + */ + EAttribute DIAGRAM__TYPE = eINSTANCE.getDiagram_Type(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl + * Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSemanticModelBridge() + * @generated + */ + EClass SEMANTIC_MODEL_BRIDGE = eINSTANCE.getSemanticModelBridge(); + + /** + * The meta object literal for the 'Presentation' attribute feature. + * + * @generated + */ + EAttribute SEMANTIC_MODEL_BRIDGE__PRESENTATION = eINSTANCE.getSemanticModelBridge_Presentation(); + + /** + * The meta object literal for the 'Graph Element' reference feature. + * + * @generated + */ + EReference SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = eINSTANCE.getSemanticModelBridge_GraphElement(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl + * Simple Semantic Model Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSimpleSemanticModelElement() + * @generated + */ + EClass SIMPLE_SEMANTIC_MODEL_ELEMENT = eINSTANCE.getSimpleSemanticModelElement(); + + /** + * The meta object literal for the 'Typeinfo' attribute feature. + * + * @generated + */ + EAttribute SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO = eINSTANCE.getSimpleSemanticModelElement_Typeinfo(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl + * Uml1 Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getUml1SemanticModelBridge() + * @generated + */ + EClass UML1_SEMANTIC_MODEL_BRIDGE = eINSTANCE.getUml1SemanticModelBridge(); + + /** + * The meta object literal for the 'Element' reference feature. + * + * @generated + */ + EReference UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT = eINSTANCE.getUml1SemanticModelBridge_Element(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl + * Core Semantic Model Bridge}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getCoreSemanticModelBridge() + * @generated + */ + EClass CORE_SEMANTIC_MODEL_BRIDGE = eINSTANCE.getCoreSemanticModelBridge(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl + * Leaf Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getLeafElement() + * @generated + */ + EClass LEAF_ELEMENT = eINSTANCE.getLeafElement(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl + * Text Element}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.TextElementImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getTextElement() + * @generated + */ + EClass TEXT_ELEMENT = eINSTANCE.getTextElement(); + + /** + * The meta object literal for the 'Text' attribute feature. + * + * @generated + */ + EAttribute TEXT_ELEMENT__TEXT = eINSTANCE.getTextElement_Text(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl Image}' class. + * + * + * @see org.eclipse.papyrus.conversion.di2.impl.ImageImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getImage() + * @generated + */ + EClass IMAGE = eINSTANCE.getImage(); + + /** + * The meta object literal for the 'Uri' attribute feature. + * + * @generated + */ + EAttribute IMAGE__URI = eINSTANCE.getImage_Uri(); + + /** + * The meta object literal for the 'Mime Type' attribute feature. + * + * @generated + */ + EAttribute IMAGE__MIME_TYPE = eINSTANCE.getImage_MimeType(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl + * Graphic Primitive}' class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphicPrimitive() + * @generated + */ + EClass GRAPHIC_PRIMITIVE = eINSTANCE.getGraphicPrimitive(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl Polilyne}' + * class. + * + * @see org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPolilyne() + * @generated + */ + EClass POLILYNE = eINSTANCE.getPolilyne(); + + /** + * The meta object literal for the 'Waypoints' attribute list feature. + * + * @generated + */ + EAttribute POLILYNE__WAYPOINTS = eINSTANCE.getPolilyne_Waypoints(); + + /** + * The meta object literal for the 'Closed' attribute list feature. + * + * @generated + */ + EAttribute POLILYNE__CLOSED = eINSTANCE.getPolilyne_Closed(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl Ellipse}' class. + * + * + * @see org.eclipse.papyrus.conversion.di2.impl.EllipseImpl + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getEllipse() + * @generated + */ + EClass ELLIPSE = eINSTANCE.getEllipse(); + + /** + * The meta object literal for the 'Center' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__CENTER = eINSTANCE.getEllipse_Center(); + + /** + * The meta object literal for the 'Radius X' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__RADIUS_X = eINSTANCE.getEllipse_RadiusX(); + + /** + * The meta object literal for the 'Radius Y' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__RADIUS_Y = eINSTANCE.getEllipse_RadiusY(); + + /** + * The meta object literal for the 'Rotation' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__ROTATION = eINSTANCE.getEllipse_Rotation(); + + /** + * The meta object literal for the 'Start Angle' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__START_ANGLE = eINSTANCE.getEllipse_StartAngle(); + + /** + * The meta object literal for the 'End Angle' attribute feature. + * + * @generated + */ + EAttribute ELLIPSE__END_ANGLE = eINSTANCE.getEllipse_EndAngle(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * Papyrus Key Enumeration}' enum. + * + * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPapyrusKeyEnumeration() + * @generated + */ + EEnum PAPYRUS_KEY_ENUMERATION = eINSTANCE.getPapyrusKeyEnumeration(); + + /** + * The meta object literal for the 'Point' data type. + * + * @see org.eclipse.draw2d.geometry.Point + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPoint() + * @generated + */ + EDataType POINT = eINSTANCE.getPoint(); + + /** + * The meta object literal for the 'Dimension' data type. + * + * + * @see org.eclipse.draw2d.geometry.Dimension + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDimension() + * @generated + */ + EDataType DIMENSION = eINSTANCE.getDimension(); + + /** + * The meta object literal for the 'Double' data type. + * + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDouble() + * @generated + */ + EDataType DOUBLE = eINSTANCE.getDouble(); + + /** + * The meta object literal for the 'RGB' data type. + * + * @see org.eclipse.swt.graphics.RGB + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getRGB() + * @generated + */ + EDataType RGB = eINSTANCE.getRGB(); + + /** + * The meta object literal for the 'String' data type. + * + * @see java.lang.String + * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getString() + * @generated + */ + EDataType STRING = eINSTANCE.getString(); + + } + +} // Di2Package diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java new file mode 100644 index 00000000000..e407669b999 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java @@ -0,0 +1,187 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Diagram'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner Owner}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getName Name}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom Zoom}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport Viewport}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink Diagram Link}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getType Type}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram() + * @model + * @generated + */ +public interface Diagram extends GraphNode { + + /** + * Returns the value of the 'Owner' containment reference. + *

    + * If the meaning of the 'Owner' containment reference isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Owner' containment reference. + * @see #setOwner(SemanticModelBridge) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Owner() + * @model containment="true" required="true" + * @generated + */ + SemanticModelBridge getOwner(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner + * Owner}' containment reference. + * + * @param value + * the new value of the 'Owner' containment reference. + * @see #getOwner() + * @generated + */ + void setOwner(SemanticModelBridge value); + + /** + * Returns the value of the 'Name' attribute. + *

    + * If the meaning of the 'Name' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Name() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getName + * Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Zoom' attribute. + *

    + * If the meaning of the 'Zoom' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Zoom' attribute. + * @see #setZoom(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Zoom() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getZoom(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom + * Zoom}' attribute. + * + * @param value + * the new value of the 'Zoom' attribute. + * @see #getZoom() + * @generated + */ + void setZoom(double value); + + /** + * Returns the value of the 'Viewport' attribute. + *

    + * If the meaning of the 'Viewport' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Viewport' attribute. + * @see #setViewport(Point) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Viewport() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + Point getViewport(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport + * Viewport}' attribute. + * + * @param value + * the new value of the 'Viewport' attribute. + * @see #getViewport() + * @generated + */ + void setViewport(Point value); + + /** + * Returns the value of the 'Diagram Link' reference list. The list contents are + * of type {@link org.eclipse.papyrus.conversion.di2.DiagramLink}. + *

    + * If the meaning of the 'Diagram Link' reference list isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Diagram Link' reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_DiagramLink() + * @model + * @generated + */ + EList getDiagramLink(); + + /** + * Returns the value of the 'Type' attribute. + *

    + * If the meaning of the 'Type' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Type() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getType + * Type}' attribute. + * + * @param value + * the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + +} // Diagram diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java new file mode 100644 index 00000000000..96ac0a3a71b --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java @@ -0,0 +1,489 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.swt.graphics.RGB; + +/** + * A representation of the model object 'Diagram Element'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty Property}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible Is Visible + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getReference Reference + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer Container + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily Font Family + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} + *
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle Line Style + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness Line + * Thickness}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor Font Color + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor + * Foreground Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor + * Background Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor Border Color + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent Translucent + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent Semantic + * Parent}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild Semantic + * Child}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement() + * @model + * @generated + */ +public interface DiagramElement extends EObject { + + /** + * Returns the value of the 'Property' containment reference list. The list + * contents are of type {@link org.eclipse.papyrus.conversion.di2.Property}. + *

    + * If the meaning of the 'Property' containment reference list isn't clear, there + * really should be more of a description here... + *

    + * + * + * @return the value of the 'Property' containment reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Property() + * @model containment="true" + * @generated + */ + EList getProperty(); + + /** + * Returns the value of the 'Is Visible' attribute. + *

    + * If the meaning of the 'Is Visible' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Is Visible' attribute. + * @see #setIsVisible(boolean) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_IsVisible() + * @model dataType="org.eclipse.uml2.uml.Boolean" + * @generated + */ + boolean isIsVisible(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible + * Is Visible}' attribute. + * + * @param value + * the new value of the 'Is Visible' attribute. + * @see #isIsVisible() + * @generated + */ + void setIsVisible(boolean value); + + /** + * Returns the value of the 'Reference' reference list. The list contents are of + * type {@link org.eclipse.papyrus.conversion.di2.Reference}. + *

    + * If the meaning of the 'Reference' reference list isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Reference' reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Reference() + * @model + * @generated + */ + EList getReference(); + + /** + * Returns the value of the 'Container' container reference. It is bidirectional + * and its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained} + * '. + *

    + * If the meaning of the 'Container' container reference isn't clear, there really + * should be more of a description here... + *

    + * + * + * @return the value of the 'Container' container reference. + * @see #setContainer(GraphElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Container() + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getContained + * @model opposite="contained" transient="false" + * @generated + */ + GraphElement getContainer(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer + * Container}' container reference. + * + * @param value + * the new value of the 'Container' container reference. + * @see #getContainer() + * @generated + */ + void setContainer(GraphElement value); + + /** + * Returns the value of the 'Font Family' attribute. The default value is + * "". + *

    + * If the meaning of the 'Font Family' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Font Family' attribute. + * @see #setFontFamily(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontFamily() + * @model default="" dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getFontFamily(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily + * Font Family}' attribute. + * + * @param value + * the new value of the 'Font Family' attribute. + * @see #getFontFamily() + * @generated + */ + void setFontFamily(String value); + + /** + * Returns the value of the 'Font Size' attribute. The default value is + * "10". + *

    + * If the meaning of the 'Font Size' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Font Size' attribute. + * @see #setFontSize(int) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontSize() + * @model default="10" dataType="org.eclipse.uml2.uml.Integer" + * @generated + */ + int getFontSize(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} + * ' attribute. + * + * @param value + * the new value of the 'Font Size' attribute. + * @see #getFontSize() + * @generated + */ + void setFontSize(int value); + + /** + * Returns the value of the 'Line Style' attribute. The default value is + * "". + *

    + * If the meaning of the 'Line Style' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Line Style' attribute. + * @see #setLineStyle(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_LineStyle() + * @model default="" dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getLineStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle + * Line Style}' attribute. + * + * @param value + * the new value of the 'Line Style' attribute. + * @see #getLineStyle() + * @generated + */ + void setLineStyle(String value); + + /** + * Returns the value of the 'Line Thickness' attribute. The default value is + * "1". + *

    + * If the meaning of the 'Line Thickness' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Line Thickness' attribute. + * @see #setLineThickness(int) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_LineThickness() + * @model default="1" dataType="org.eclipse.uml2.uml.Integer" + * @generated + */ + int getLineThickness(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness + * Line Thickness}' attribute. + * + * @param value + * the new value of the 'Line Thickness' attribute. + * @see #getLineThickness() + * @generated + */ + void setLineThickness(int value); + + /** + * Returns the value of the 'Font Color' attribute. + *

    + * If the meaning of the 'Font Color' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Font Color' attribute. + * @see #setFontColor(RGB) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontColor() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" + * @generated + */ + RGB getFontColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor + * Font Color}' attribute. + * + * @param value + * the new value of the 'Font Color' attribute. + * @see #getFontColor() + * @generated + */ + void setFontColor(RGB value); + + /** + * Returns the value of the 'Foreground Color' attribute. + *

    + * If the meaning of the 'Foreground Color' attribute isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Foreground Color' attribute. + * @see #setForegroundColor(RGB) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_ForegroundColor() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" + * @generated + */ + RGB getForegroundColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor + * Foreground Color}' attribute. + * + * @param value + * the new value of the 'Foreground Color' attribute. + * @see #getForegroundColor() + * @generated + */ + void setForegroundColor(RGB value); + + /** + * Returns the value of the 'Background Color' attribute. + *

    + * If the meaning of the 'Background Color' attribute isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Background Color' attribute. + * @see #setBackgroundColor(RGB) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_BackgroundColor() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" + * @generated + */ + RGB getBackgroundColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor + * Background Color}' attribute. + * + * @param value + * the new value of the 'Background Color' attribute. + * @see #getBackgroundColor() + * @generated + */ + void setBackgroundColor(RGB value); + + /** + * Returns the value of the 'Border Color' attribute. + *

    + * If the meaning of the 'Border Color' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Border Color' attribute. + * @see #setBorderColor(RGB) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_BorderColor() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" + * @generated + */ + RGB getBorderColor(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor + * Border Color}' attribute. + * + * @param value + * the new value of the 'Border Color' attribute. + * @see #getBorderColor() + * @generated + */ + void setBorderColor(RGB value); + + /** + * Returns the value of the 'Translucent' attribute. + *

    + * If the meaning of the 'Translucent' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Translucent' attribute. + * @see #setTranslucent(boolean) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Translucent() + * @model dataType="org.eclipse.uml2.uml.Boolean" + * @generated + */ + boolean isTranslucent(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent + * Translucent}' attribute. + * + * @param value + * the new value of the 'Translucent' attribute. + * @see #isTranslucent() + * @generated + */ + void setTranslucent(boolean value); + + /** + * Returns the value of the 'Semantic Parent' reference. It is bidirectional and + * its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild + * Semantic Child}'. + *

    + * If the meaning of the 'Semantic Parent' reference isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Semantic Parent' reference. + * @see #setSemanticParent(DiagramElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_SemanticParent() + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild + * @model opposite="semanticChild" + * @generated + */ + DiagramElement getSemanticParent(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent + * Semantic Parent}' reference. + * + * @param value + * the new value of the 'Semantic Parent' reference. + * @see #getSemanticParent() + * @generated + */ + void setSemanticParent(DiagramElement value); + + /** + * Returns the value of the 'Semantic Child' reference list. The list contents + * are of type {@link org.eclipse.papyrus.conversion.di2.DiagramElement}. It is + * bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent + * Semantic Parent}'. + *

    + * If the meaning of the 'Semantic Child' reference list isn't clear, there really + * should be more of a description here... + *

    + * + * + * @return the value of the 'Semantic Child' reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_SemanticChild() + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent + * @model opposite="semanticParent" + * @generated + */ + EList getSemanticChild(); + + /** + * + * + * @model keyDataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body='java.util.Iterator it = getProperty().iterator();\r\nwhile (it.hasNext()) {\r\n\tProperty element = (Property) it.next();\r\n\tif(key.equals(element.getKey())) {\r\n\t\treturn element;\r\n\t}\r\n}\r\nreturn null;'" + * @generated + */ + Property getProperty(String key); + + /** + * + * + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.String" + * keyDataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body=' if(this.getProperty(key)!=null){\r\n\treturn this.getProperty(key).getValue();}\r\nreturn null;\r\n\t'" + * @generated + */ + String getPropertyValue(String key); + + /** + * it is used to obtain + * the name of the good editpart + * + * @model kind="operation" dataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body='return this.getPropertyValue(com.cea.papyrus.diagraminterchange2.di2.PapyrusKeyEnumeration.PAPYRUSEDITPART.getLiteral());'" + * @generated + */ + String getEditpartName(); + +} // DiagramElement diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java new file mode 100644 index 00000000000..ad9325318a6 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java @@ -0,0 +1,144 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Diagram Link'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram Diagram}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom Zoom}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement Graph Element + * }
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink() + * @model + * @generated + */ +public interface DiagramLink extends EObject { + + /** + * Returns the value of the 'Diagram' reference. + *

    + * If the meaning of the 'Diagram' reference isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Diagram' reference. + * @see #setDiagram(Diagram) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Diagram() + * @model required="true" + * @generated + */ + Diagram getDiagram(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram + * Diagram}' reference. + * + * @param value + * the new value of the 'Diagram' reference. + * @see #getDiagram() + * @generated + */ + void setDiagram(Diagram value); + + /** + * Returns the value of the 'Zoom' attribute. + *

    + * If the meaning of the 'Zoom' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Zoom' attribute. + * @see #setZoom(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Zoom() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getZoom(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom + * Zoom}' attribute. + * + * @param value + * the new value of the 'Zoom' attribute. + * @see #getZoom() + * @generated + */ + void setZoom(double value); + + /** + * Returns the value of the 'Viewport' attribute. + *

    + * If the meaning of the 'Viewport' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Viewport' attribute. + * @see #setViewport(Point) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Viewport() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + Point getViewport(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}' + * attribute. + * + * @param value + * the new value of the 'Viewport' attribute. + * @see #getViewport() + * @generated + */ + void setViewport(Point value); + + /** + * Returns the value of the 'Graph Element' reference. + *

    + * If the meaning of the 'Graph Element' reference isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Graph Element' reference. + * @see #setGraphElement(GraphElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_GraphElement() + * @model required="true" + * @generated + */ + GraphElement getGraphElement(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement + * Graph Element}' reference. + * + * @param value + * the new value of the 'Graph Element' reference. + * @see #getGraphElement() + * @generated + */ + void setGraphElement(GraphElement value); + +} // DiagramLink diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java new file mode 100644 index 00000000000..201533a1643 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java @@ -0,0 +1,195 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +/** + * A representation of the model object 'Ellipse'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter Center}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX Radius X}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY Radius Y}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation Rotation}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle Start Angle}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle End Angle}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse() + * @model + * @generated + */ +public interface Ellipse extends GraphicPrimitive { + + /** + * Returns the value of the 'Center' attribute. + *

    + * If the meaning of the 'Center' attribute isn't clear, there really should be more of + * a description here... + *

    + * + * + * @return the value of the 'Center' attribute. + * @see #setCenter(Point) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_Center() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + Point getCenter(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter + * Center}' attribute. + * + * @param value + * the new value of the 'Center' attribute. + * @see #getCenter() + * @generated + */ + void setCenter(Point value); + + /** + * Returns the value of the 'Radius X' attribute. + *

    + * If the meaning of the 'Radius X' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Radius X' attribute. + * @see #setRadiusX(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_RadiusX() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getRadiusX(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX + * Radius X}' attribute. + * + * @param value + * the new value of the 'Radius X' attribute. + * @see #getRadiusX() + * @generated + */ + void setRadiusX(double value); + + /** + * Returns the value of the 'Radius Y' attribute. + *

    + * If the meaning of the 'Radius Y' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Radius Y' attribute. + * @see #setRadiusY(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_RadiusY() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getRadiusY(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY + * Radius Y}' attribute. + * + * @param value + * the new value of the 'Radius Y' attribute. + * @see #getRadiusY() + * @generated + */ + void setRadiusY(double value); + + /** + * Returns the value of the 'Rotation' attribute. + *

    + * If the meaning of the 'Rotation' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Rotation' attribute. + * @see #setRotation(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_Rotation() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getRotation(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation + * Rotation}' attribute. + * + * @param value + * the new value of the 'Rotation' attribute. + * @see #getRotation() + * @generated + */ + void setRotation(double value); + + /** + * Returns the value of the 'Start Angle' attribute. + *

    + * If the meaning of the 'Start Angle' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Start Angle' attribute. + * @see #setStartAngle(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_StartAngle() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getStartAngle(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle + * Start Angle}' attribute. + * + * @param value + * the new value of the 'Start Angle' attribute. + * @see #getStartAngle() + * @generated + */ + void setStartAngle(double value); + + /** + * Returns the value of the 'End Angle' attribute. + *

    + * If the meaning of the 'End Angle' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'End Angle' attribute. + * @see #setEndAngle(double) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_EndAngle() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" + * @generated + */ + double getEndAngle(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle + * End Angle}' attribute. + * + * @param value + * the new value of the 'End Angle' attribute. + * @see #getEndAngle() + * @generated + */ + void setEndAngle(double value); + +} // Ellipse diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java new file mode 100644 index 00000000000..f2c69450c48 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java @@ -0,0 +1,115 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Graph Connector'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge Graph Edge + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement Graph + * Element}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector() + * @model + * @generated + */ +public interface GraphConnector extends EObject { + + /** + * Returns the value of the 'Position' attribute. + *

    + * If the meaning of the 'Position' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Position' attribute. + * @see #setPosition(Point) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_Position() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + Point getPosition(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position}' + * attribute. + * + * @param value + * the new value of the 'Position' attribute. + * @see #getPosition() + * @generated + */ + void setPosition(Point value); + + /** + * Returns the value of the 'Graph Edge' reference list. The list contents are + * of type {@link org.eclipse.papyrus.conversion.di2.GraphEdge}. It is bidirectional and + * its opposite is '{@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor + * Anchor}'. + *

    + * If the meaning of the 'Graph Edge' reference list isn't clear, there really should + * be more of a description here... + *

    + * + * + * @return the value of the 'Graph Edge' reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_GraphEdge() + * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor + * @model opposite="anchor" + * @generated + */ + EList getGraphEdge(); + + /** + * Returns the value of the 'Graph Element' container reference. It is + * bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage} + * '. + *

    + * If the meaning of the 'Graph Element' container reference isn't clear, there really + * should be more of a description here... + *

    + * + * + * @return the value of the 'Graph Element' container reference. + * @see #setGraphElement(GraphElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_GraphElement() + * @see org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage + * @model opposite="anchorage" required="true" transient="false" + * @generated + */ + GraphElement getGraphElement(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement + * Graph Element}' container reference. + * + * @param value + * the new value of the 'Graph Element' container reference. + * @see #getGraphElement() + * @generated + */ + void setGraphElement(GraphElement value); + +} // GraphConnector diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java new file mode 100644 index 00000000000..c67362796e9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java @@ -0,0 +1,106 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Graph Edge'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor Anchor}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints Waypoints}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge() + * @model + * @generated + */ +public interface GraphEdge extends GraphElement { + + /** + * Returns the value of the 'Anchor' reference list. The list contents are of + * type {@link org.eclipse.papyrus.conversion.di2.GraphConnector}. It is bidirectional and + * its opposite is '{@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge + * Graph Edge}'. + *

    + * If the meaning of the 'Anchor' reference list isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Anchor' reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge_Anchor() + * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge + * @model opposite="graphEdge" upper="2" + * @generated + */ + EList getAnchor(); + + /** + * Returns the value of the 'Waypoints' attribute list. The list contents are of + * type {@link org.eclipse.draw2d.geometry.Point}. + *

    + * If the meaning of the 'Waypoints' attribute list isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Waypoints' attribute list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge_Waypoints() + * @model default="" dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + EList getWaypoints(); + + /** + * + * + * @model kind="operation" annotation="http://www.eclipse.org/emf/2002/GenModel body='return ((GraphConnector)getAnchor().get(0)).getGraphElement();'" + * @generated + */ + GraphElement getAnchorSource(); + + /** + * + * + * @model kind="operation" annotation="http://www.eclipse.org/emf/2002/GenModel body='return ((GraphConnector)getAnchor().get(1)).getGraphElement();'" + * @generated + */ + GraphElement getAnchorTarget(); + + /** + * + * + * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='initConnectors();\r\n((GraphConnector)getAnchor().get(0)).setGraphElement(value);'" + * @generated + */ + void setAnchorSource(GraphElement value); + + /** + * + * + * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='initConnectors();\r\n((GraphConnector)getAnchor().get(1)).setGraphElement(value);'" + * @generated + */ + void setAnchorTarget(GraphElement value); + + /** + * + * + * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='if(!getAnchor().isEmpty())\r\n return;\r\n \t\r\ngetAnchor().add( Di2Package.eINSTANCE.getDi2Factory().createGraphConnector() ) ;\r\ngetAnchor().add( Di2Package.eINSTANCE.getDi2Factory().createGraphConnector() ) ;\r\n'" + * @generated + */ + void initConnectors(); + +} // GraphEdge diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java new file mode 100644 index 00000000000..7a53f116396 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java @@ -0,0 +1,150 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Graph Element'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getLink Link}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel Semantic + * Model}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement() + * @model + * @generated + */ +public interface GraphElement extends DiagramElement { + + /** + * Returns the value of the 'Contained' containment reference list. The list + * contents are of type {@link org.eclipse.papyrus.conversion.di2.DiagramElement}. It is + * bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer + * Container}'. + *

    + * If the meaning of the 'Contained' containment reference list isn't clear, there + * really should be more of a description here... + *

    + * + * + * @return the value of the 'Contained' containment reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Contained() + * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer + * @model opposite="container" containment="true" + * @generated + */ + EList getContained(); + + /** + * Returns the value of the 'Link' containment reference list. The list contents + * are of type {@link org.eclipse.papyrus.conversion.di2.DiagramLink}. + *

    + * If the meaning of the 'Link' containment reference list isn't clear, there really + * should be more of a description here... + *

    + * + * + * @return the value of the 'Link' containment reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Link() + * @model containment="true" + * @generated + */ + EList getLink(); + + /** + * Returns the value of the 'Semantic Model' containment reference. + *

    + * If the meaning of the 'Semantic Model' containment reference isn't clear, there + * really should be more of a description here... + *

    + * + * + * @return the value of the 'Semantic Model' containment reference. + * @see #setSemanticModel(SemanticModelBridge) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_SemanticModel() + * @model containment="true" + * @generated + */ + SemanticModelBridge getSemanticModel(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel + * Semantic Model}' containment reference. + * + * @param value + * the new value of the 'Semantic Model' containment reference. + * @see #getSemanticModel() + * @generated + */ + void setSemanticModel(SemanticModelBridge value); + + /** + * Returns the value of the 'Position' attribute. + *

    + * If the meaning of the 'Position' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Position' attribute. + * @see #setPosition(Point) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Position() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" + * @generated + */ + Point getPosition(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}' + * attribute. + * + * @param value + * the new value of the 'Position' attribute. + * @see #getPosition() + * @generated + */ + void setPosition(Point value); + + /** + * Returns the value of the 'Anchorage' containment reference list. The list + * contents are of type {@link org.eclipse.papyrus.conversion.di2.GraphConnector}. It is + * bidirectional and its opposite is ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement + * Graph Element}'. + *

    + * If the meaning of the 'Anchorage' containment reference list isn't clear, there + * really should be more of a description here... + *

    + * + * + * @return the value of the 'Anchorage' containment reference list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Anchorage() + * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement + * @model opposite="graphElement" containment="true" + * @generated + */ + EList getAnchorage(); + +} // GraphElement diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java new file mode 100644 index 00000000000..15c4722f878 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Dimension; + +/** + * A representation of the model object 'Graph Node'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize Size}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphNode() + * @model + * @generated + */ +public interface GraphNode extends GraphElement { + + /** + * Returns the value of the 'Size' attribute. + *

    + * If the meaning of the 'Size' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Size' attribute. + * @see #setSize(Dimension) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphNode_Size() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Dimension" + * @generated + */ + Dimension getSize(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize + * Size}' attribute. + * + * @param value + * the new value of the 'Size' attribute. + * @see #getSize() + * @generated + */ + void setSize(Dimension value); + +} // GraphNode diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java new file mode 100644 index 00000000000..2b3a65939f8 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java @@ -0,0 +1,19 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object 'Graphic Primitive'. + * + * + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphicPrimitive() + * @model + * @generated + */ +public interface GraphicPrimitive extends LeafElement { +} // GraphicPrimitive diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java new file mode 100644 index 00000000000..41157e8b0ef --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java @@ -0,0 +1,81 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object 'Image'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Image#getUri Uri}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Image#getMimeType Mime Type}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage() + * @model + * @generated + */ +public interface Image extends LeafElement { + + /** + * Returns the value of the 'Uri' attribute. + *

    + * If the meaning of the 'Uri' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Uri' attribute. + * @see #setUri(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage_Uri() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getUri(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Image#getUri + * Uri}' attribute. + * + * @param value + * the new value of the 'Uri' attribute. + * @see #getUri() + * @generated + */ + void setUri(String value); + + /** + * Returns the value of the 'Mime Type' attribute. + *

    + * If the meaning of the 'Mime Type' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Mime Type' attribute. + * @see #setMimeType(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage_MimeType() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getMimeType(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Image#getMimeType + * Mime Type}' attribute. + * + * @param value + * the new value of the 'Mime Type' attribute. + * @see #getMimeType() + * @generated + */ + void setMimeType(String value); + +} // Image diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java new file mode 100644 index 00000000000..4b98cb5a984 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java @@ -0,0 +1,19 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object 'Leaf Element'. + * + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getLeafElement() + * @model + * @generated + */ +public interface LeafElement extends DiagramElement { +} // LeafElement diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java new file mode 100644 index 00000000000..f7454d77909 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java @@ -0,0 +1,182 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * A representation of the literals of the enumeration ' + * Papyrus Key Enumeration', and utility methods for working with them. + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPapyrusKeyEnumeration() + * @model + * @generated + */ +public enum PapyrusKeyEnumeration implements Enumerator { + /** + * The 'Papyruseditpart' literal object. + * + * @see #PAPYRUSEDITPART_VALUE + * @generated + * @ordered + */ + PAPYRUSEDITPART(0, "papyruseditpart", "papyruseditpart"); + + /** + * The 'Papyruseditpart' literal value. + *

    + * If the meaning of 'Papyruseditpart' literal object isn't clear, there really + * should be more of a description here... + *

    + * + * + * @see #PAPYRUSEDITPART + * @model name="papyruseditpart" + * @generated + * @ordered + */ + public static final int PAPYRUSEDITPART_VALUE = 0; + + /** + * An array of all the 'Papyrus Key Enumeration' enumerators. + * + * @generated + */ + private static final PapyrusKeyEnumeration[] VALUES_ARRAY = new PapyrusKeyEnumeration[] { PAPYRUSEDITPART, }; + + /** + * A public read-only list of all the 'Papyrus Key Enumeration' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Papyrus Key Enumeration' literal with the specified literal + * value. + * + * @generated + */ + public static PapyrusKeyEnumeration get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + PapyrusKeyEnumeration result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Papyrus Key Enumeration' literal with the specified name. + * + * @generated + */ + public static PapyrusKeyEnumeration getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + PapyrusKeyEnumeration result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Papyrus Key Enumeration' literal with the specified integer + * value. + * + * @generated + */ + public static PapyrusKeyEnumeration get(int value) { + switch (value) { + case PAPYRUSEDITPART_VALUE: + return PAPYRUSEDITPART; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * @generated + */ + private PapyrusKeyEnumeration(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // PapyrusKeyEnumeration diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java new file mode 100644 index 00000000000..ea5529820ed --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java @@ -0,0 +1,63 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Polilyne'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints Waypoints}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Polilyne#getClosed Closed}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne() + * @model + * @generated + */ +public interface Polilyne extends GraphicPrimitive { + + /** + * Returns the value of the 'Waypoints' attribute list. The list contents are of + * type {@link org.eclipse.draw2d.geometry.Point}. + *

    + * If the meaning of the 'Waypoints' attribute list isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Waypoints' attribute list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne_Waypoints() + * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" lower="2" + * @generated + */ + EList getWaypoints(); + + /** + * Returns the value of the 'Closed' attribute list. The list contents are of + * type {@link java.lang.Boolean}. + *

    + * If the meaning of the 'Closed' attribute list isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Closed' attribute list. + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne_Closed() + * @model dataType="org.eclipse.uml2.uml.Boolean" lower="2" + * @generated + */ + EList getClosed(); + +} // Polilyne diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java new file mode 100644 index 00000000000..722cf36092a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java @@ -0,0 +1,83 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Property'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Property#getKey Key}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Property#getValue Value}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty() + * @model + * @generated + */ +public interface Property extends EObject { + + /** + * Returns the value of the 'Key' attribute. + *

    + * If the meaning of the 'Key' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Key' attribute. + * @see #setKey(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty_Key() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getKey(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Property#getKey + * Key}' attribute. + * + * @param value + * the new value of the 'Key' attribute. + * @see #getKey() + * @generated + */ + void setKey(String value); + + /** + * Returns the value of the 'Value' attribute. + *

    + * If the meaning of the 'Value' attribute isn't clear, there really should be more of + * a description here... + *

    + * + * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty_Value() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Property#getValue + * Value}' attribute. + * + * @param value + * the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // Property diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java new file mode 100644 index 00000000000..7a67ed0e5fa --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java @@ -0,0 +1,86 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object 'Reference'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation Is + * Individual Representation}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference() + * @model + * @generated + */ +public interface Reference extends DiagramElement { + + /** + * Returns the value of the 'Is Individual Representation' attribute. + *

    + * If the meaning of the 'Is Individual Representation' attribute isn't clear, there + * really should be more of a description here... + *

    + * + * + * @return the value of the 'Is Individual Representation' attribute. + * @see #setIsIndividualRepresentation(boolean) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference_IsIndividualRepresentation() + * @model dataType="org.eclipse.uml2.uml.Boolean" + * @generated + */ + boolean isIsIndividualRepresentation(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation + * Is Individual Representation}' attribute. + * + * @param value + * the new value of the 'Is Individual Representation' attribute. + * @see #isIsIndividualRepresentation() + * @generated + */ + void setIsIndividualRepresentation(boolean value); + + /** + * Returns the value of the 'Referenced' reference. + *

    + * If the meaning of the 'Referenced' reference isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Referenced' reference. + * @see #setReferenced(DiagramElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference_Referenced() + * @model required="true" + * @generated + */ + DiagramElement getReferenced(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}' + * reference. + * + * @param value + * the new value of the 'Referenced' reference. + * @see #getReferenced() + * @generated + */ + void setReferenced(DiagramElement value); + +} // Reference diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java new file mode 100644 index 00000000000..01086766fef --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java @@ -0,0 +1,87 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object ' + * Semantic Model Bridge'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation + * Presentation}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement Graph + * Element}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge() + * @model + * @generated + */ +public interface SemanticModelBridge extends EObject { + + /** + * Returns the value of the 'Presentation' attribute. + *

    + * If the meaning of the 'Presentation' attribute isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Presentation' attribute. + * @see #setPresentation(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge_Presentation() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getPresentation(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation + * Presentation}' attribute. + * + * @param value + * the new value of the 'Presentation' attribute. + * @see #getPresentation() + * @generated + */ + void setPresentation(String value); + + /** + * Returns the value of the 'Graph Element' reference. + *

    + * If the meaning of the 'Graph Element' reference isn't clear, there really should be + * more of a description here... + *

    + * + * + * @return the value of the 'Graph Element' reference. + * @see #setGraphElement(GraphElement) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge_GraphElement() + * @model + * @generated + */ + GraphElement getGraphElement(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement + * Graph Element}' reference. + * + * @param value + * the new value of the 'Graph Element' reference. + * @see #getGraphElement() + * @generated + */ + void setGraphElement(GraphElement value); + +} // SemanticModelBridge diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java new file mode 100644 index 00000000000..0177655afb4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object ' + * Simple Semantic Model Element'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo + * Typeinfo}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSimpleSemanticModelElement() + * @model + * @generated + */ +public interface SimpleSemanticModelElement extends SemanticModelBridge { + + /** + * Returns the value of the 'Typeinfo' attribute. + *

    + * If the meaning of the 'Typeinfo' attribute isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Typeinfo' attribute. + * @see #setTypeinfo(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSimpleSemanticModelElement_Typeinfo() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getTypeinfo(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo + * Typeinfo}' attribute. + * + * @param value + * the new value of the 'Typeinfo' attribute. + * @see #getTypeinfo() + * @generated + */ + void setTypeinfo(String value); + +} // SimpleSemanticModelElement diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java new file mode 100644 index 00000000000..5c95c1f6012 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java @@ -0,0 +1,53 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +/** + * A representation of the model object 'Text Element'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.TextElement#getText Text}
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getTextElement() + * @model + * @generated + */ +public interface TextElement extends LeafElement { + + /** + * Returns the value of the 'Text' attribute. + *

    + * If the meaning of the 'Text' attribute isn't clear, there really should be more of a + * description here... + *

    + * + * + * @return the value of the 'Text' attribute. + * @see #setText(String) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getTextElement_Text() + * @model dataType="org.eclipse.uml2.uml.String" + * @generated + */ + String getText(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.TextElement#getText + * Text}' attribute. + * + * @param value + * the new value of the 'Text' attribute. + * @see #getText() + * @generated + */ + void setText(String value); + +} // TextElement diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java new file mode 100644 index 00000000000..1b167ab6e98 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java @@ -0,0 +1,57 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2; + +import org.eclipse.uml2.uml.Element; + +/** + * A representation of the model object ' + * Uml1 Semantic Model Bridge'. + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement Element + * }
    • + *
    + *

    + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getUml1SemanticModelBridge() + * @model + * @generated + */ +public interface Uml1SemanticModelBridge extends SemanticModelBridge { + + /** + * Returns the value of the 'Element' reference. + *

    + * If the meaning of the 'Element' reference isn't clear, there really should be more + * of a description here... + *

    + * + * + * @return the value of the 'Element' reference. + * @see #setElement(Element) + * @see org.eclipse.papyrus.conversion.di2.Di2Package#getUml1SemanticModelBridge_Element() + * @model + * @generated + */ + Element getElement(); + + /** + * Sets the value of the ' + * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement + * Element}' reference. + * + * @param value + * the new value of the 'Element' reference. + * @see #getElement() + * @generated + */ + void setElement(Element value); + +} // Uml1SemanticModelBridge diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java new file mode 100644 index 00000000000..7225744a610 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java @@ -0,0 +1,43 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge; +import org.eclipse.papyrus.conversion.di2.Di2Package; + +/** + * An implementation of the model object ' + * Core Semantic Model Bridge'. + *

    + *

    + * + * @generated + */ +public class CoreSemanticModelBridgeImpl extends SemanticModelBridgeImpl implements CoreSemanticModelBridge { + + /** + * + * + * @generated + */ + protected CoreSemanticModelBridgeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.CORE_SEMANTIC_MODEL_BRIDGE; + } + +} // CoreSemanticModelBridgeImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java new file mode 100644 index 00000000000..597ea47733e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java @@ -0,0 +1,508 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.papyrus.conversion.di2.*; +import org.eclipse.swt.graphics.RGB; + +/** + * An implementation of the model Factory. + * + * @generated + */ +public class Di2FactoryImpl extends EFactoryImpl implements Di2Factory { + + /** + * Creates the default factory implementation. + * + * @generated + */ + public static Di2Factory init() { + try { + Di2Factory theDi2Factory = (Di2Factory) EPackage.Registry.INSTANCE.getEFactory("http://www.papyrusuml.org"); + if (theDi2Factory != null) { + return theDi2Factory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new Di2FactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public Di2FactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case Di2Package.DIAGRAM_ELEMENT: + return createDiagramElement(); + case Di2Package.GRAPH_ELEMENT: + return createGraphElement(); + case Di2Package.REFERENCE: + return createReference(); + case Di2Package.PROPERTY: + return createProperty(); + case Di2Package.GRAPH_EDGE: + return createGraphEdge(); + case Di2Package.GRAPH_CONNECTOR: + return createGraphConnector(); + case Di2Package.GRAPH_NODE: + return createGraphNode(); + case Di2Package.DIAGRAM_LINK: + return createDiagramLink(); + case Di2Package.DIAGRAM: + return createDiagram(); + case Di2Package.SEMANTIC_MODEL_BRIDGE: + return createSemanticModelBridge(); + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT: + return createSimpleSemanticModelElement(); + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE: + return createUml1SemanticModelBridge(); + case Di2Package.CORE_SEMANTIC_MODEL_BRIDGE: + return createCoreSemanticModelBridge(); + case Di2Package.LEAF_ELEMENT: + return createLeafElement(); + case Di2Package.TEXT_ELEMENT: + return createTextElement(); + case Di2Package.IMAGE: + return createImage(); + case Di2Package.GRAPHIC_PRIMITIVE: + return createGraphicPrimitive(); + case Di2Package.POLILYNE: + return createPolilyne(); + case Di2Package.ELLIPSE: + return createEllipse(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case Di2Package.PAPYRUS_KEY_ENUMERATION: + return createPapyrusKeyEnumerationFromString(eDataType, initialValue); + case Di2Package.POINT: + return createPointFromString(eDataType, initialValue); + case Di2Package.DIMENSION: + return createDimensionFromString(eDataType, initialValue); + case Di2Package.DOUBLE: + return createDoubleFromString(eDataType, initialValue); + case Di2Package.RGB: + return createRGBFromString(eDataType, initialValue); + case Di2Package.STRING: + return createStringFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case Di2Package.PAPYRUS_KEY_ENUMERATION: + return convertPapyrusKeyEnumerationToString(eDataType, instanceValue); + case Di2Package.POINT: + return convertPointToString(eDataType, instanceValue); + case Di2Package.DIMENSION: + return convertDimensionToString(eDataType, instanceValue); + case Di2Package.DOUBLE: + return convertDoubleToString(eDataType, instanceValue); + case Di2Package.RGB: + return convertRGBToString(eDataType, instanceValue); + case Di2Package.STRING: + return convertStringToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DiagramElement createDiagramElement() { + DiagramElementImpl diagramElement = new DiagramElementImpl(); + return diagramElement; + } + + /** + * + * + * @generated + */ + public GraphElement createGraphElement() { + GraphElementImpl graphElement = new GraphElementImpl(); + return graphElement; + } + + /** + * + * + * @generated + */ + public Reference createReference() { + ReferenceImpl reference = new ReferenceImpl(); + return reference; + } + + /** + * + * + * @generated + */ + public Property createProperty() { + PropertyImpl property = new PropertyImpl(); + return property; + } + + /** + * + * + * @generated + */ + public GraphEdge createGraphEdge() { + GraphEdgeImpl graphEdge = new GraphEdgeImpl(); + return graphEdge; + } + + /** + * + * + * @generated + */ + public GraphConnector createGraphConnector() { + GraphConnectorImpl graphConnector = new GraphConnectorImpl(); + return graphConnector; + } + + /** + * + * + * @generated + */ + public GraphNode createGraphNode() { + GraphNodeImpl graphNode = new GraphNodeImpl(); + return graphNode; + } + + /** + * + * + * @generated + */ + public DiagramLink createDiagramLink() { + DiagramLinkImpl diagramLink = new DiagramLinkImpl(); + return diagramLink; + } + + /** + * + * + * @generated + */ + public Diagram createDiagram() { + DiagramImpl diagram = new DiagramImpl(); + return diagram; + } + + /** + * + * + * @generated + */ + public SemanticModelBridge createSemanticModelBridge() { + SemanticModelBridgeImpl semanticModelBridge = new SemanticModelBridgeImpl(); + return semanticModelBridge; + } + + /** + * + * + * @generated + */ + public SimpleSemanticModelElement createSimpleSemanticModelElement() { + SimpleSemanticModelElementImpl simpleSemanticModelElement = new SimpleSemanticModelElementImpl(); + return simpleSemanticModelElement; + } + + /** + * + * + * @generated + */ + public Uml1SemanticModelBridge createUml1SemanticModelBridge() { + Uml1SemanticModelBridgeImpl uml1SemanticModelBridge = new Uml1SemanticModelBridgeImpl(); + return uml1SemanticModelBridge; + } + + /** + * + * + * @generated + */ + public CoreSemanticModelBridge createCoreSemanticModelBridge() { + CoreSemanticModelBridgeImpl coreSemanticModelBridge = new CoreSemanticModelBridgeImpl(); + return coreSemanticModelBridge; + } + + /** + * + * + * @generated + */ + public LeafElement createLeafElement() { + LeafElementImpl leafElement = new LeafElementImpl(); + return leafElement; + } + + /** + * + * + * @generated + */ + public TextElement createTextElement() { + TextElementImpl textElement = new TextElementImpl(); + return textElement; + } + + /** + * + * + * @generated + */ + public Image createImage() { + ImageImpl image = new ImageImpl(); + return image; + } + + /** + * + * + * @generated + */ + public GraphicPrimitive createGraphicPrimitive() { + GraphicPrimitiveImpl graphicPrimitive = new GraphicPrimitiveImpl(); + return graphicPrimitive; + } + + /** + * + * + * @generated + */ + public Polilyne createPolilyne() { + PolilyneImpl polilyne = new PolilyneImpl(); + return polilyne; + } + + /** + * + * + * @generated + */ + public Ellipse createEllipse() { + EllipseImpl ellipse = new EllipseImpl(); + return ellipse; + } + + /** + * + * + * @generated + */ + public PapyrusKeyEnumeration createPapyrusKeyEnumerationFromString(EDataType eDataType, String initialValue) { + PapyrusKeyEnumeration result = PapyrusKeyEnumeration.get(initialValue); + if (result == null) + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertPapyrusKeyEnumerationToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated NOT + */ + public Point createPointFromString(EDataType eDataType, String initialValue) { + // return (Point)super.createFromString(eDataType, initialValue); + if (initialValue == null) + return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); + return new Point(new Double(st.nextToken()).doubleValue(), new Double(st.nextToken()).doubleValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertPointToString(EDataType eDataType, Object instanceValue) { + // return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) + return null; + + return "" + ((Point) (instanceValue)).x + ":" + ((Point) (instanceValue)).y; + + } + + /** + * + * + * @generated NOT + */ + public Dimension createDimensionFromString(EDataType eDataType, String initialValue) { + // return (Dimension)super.createFromString(eDataType, initialValue); + if (initialValue == null) + return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); + return new Dimension(new Integer(st.nextToken()).intValue(), new Integer(st.nextToken()).intValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertDimensionToString(EDataType eDataType, Object instanceValue) { + // return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) + return null; + + return "" + ((Dimension) (instanceValue)).width + ":" + ((Dimension) (instanceValue)).height; + } + + /** + * + * + * @generated + */ + public Double createDoubleFromString(EDataType eDataType, String initialValue) { + return (Double) super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertDoubleToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated NOT + */ + public RGB createRGBFromString(EDataType eDataType, String initialValue) { + // return (RGB)super.createFromString(eDataType, initialValue); + if (initialValue == null) + return null; + java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); + return new RGB(new Integer(st.nextToken()).intValue(), new Integer(st.nextToken()).intValue(), new Integer(st + .nextToken()).intValue()); + } + + /** + * + * + * @generated NOT + */ + public String convertRGBToString(EDataType eDataType, Object instanceValue) { + // return super.convertToString(eDataType, instanceValue); + if (instanceValue == null) + return null; + + return "" + ((RGB) (instanceValue)).red + ":" + ((RGB) (instanceValue)).green + ":" + + ((RGB) (instanceValue)).blue; + } + + /** + * + * + * @generated + */ + public String createStringFromString(EDataType eDataType, String initialValue) { + return (String) super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertStringToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public Di2Package getDi2Package() { + return (Di2Package) getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static Di2Package getPackage() { + return Di2Package.eINSTANCE; + } + +} // Di2FactoryImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java new file mode 100644 index 00000000000..4241fa8b7d0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java @@ -0,0 +1,1436 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge; +import org.eclipse.papyrus.conversion.di2.Di2Factory; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Diagram; +import org.eclipse.papyrus.conversion.di2.DiagramElement; +import org.eclipse.papyrus.conversion.di2.DiagramLink; +import org.eclipse.papyrus.conversion.di2.Ellipse; +import org.eclipse.papyrus.conversion.di2.GraphConnector; +import org.eclipse.papyrus.conversion.di2.GraphEdge; +import org.eclipse.papyrus.conversion.di2.GraphElement; +import org.eclipse.papyrus.conversion.di2.GraphNode; +import org.eclipse.papyrus.conversion.di2.LeafElement; +import org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration; +import org.eclipse.papyrus.conversion.di2.Polilyne; +import org.eclipse.papyrus.conversion.di2.Reference; +import org.eclipse.papyrus.conversion.di2.TextElement; +import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * An implementation of the model Package. + * + * @generated + */ +public class Di2PackageImpl extends EPackageImpl implements Di2Package { + + /** + * + * + * @generated + */ + private EClass diagramElementEClass = null; + + /** + * + * + * @generated + */ + private EClass graphElementEClass = null; + + /** + * + * + * @generated + */ + private EClass referenceEClass = null; + + /** + * + * + * @generated + */ + private EClass propertyEClass = null; + + /** + * + * + * @generated + */ + private EClass graphEdgeEClass = null; + + /** + * + * + * @generated + */ + private EClass graphConnectorEClass = null; + + /** + * + * + * @generated + */ + private EClass graphNodeEClass = null; + + /** + * + * + * @generated + */ + private EClass diagramLinkEClass = null; + + /** + * + * + * @generated + */ + private EClass diagramEClass = null; + + /** + * + * + * @generated + */ + private EClass semanticModelBridgeEClass = null; + + /** + * + * + * @generated + */ + private EClass simpleSemanticModelElementEClass = null; + + /** + * + * + * @generated + */ + private EClass uml1SemanticModelBridgeEClass = null; + + /** + * + * + * @generated + */ + private EClass coreSemanticModelBridgeEClass = null; + + /** + * + * + * @generated + */ + private EClass leafElementEClass = null; + + /** + * + * + * @generated + */ + private EClass textElementEClass = null; + + /** + * + * + * @generated + */ + private EClass imageEClass = null; + + /** + * + * + * @generated + */ + private EClass graphicPrimitiveEClass = null; + + /** + * + * + * @generated + */ + private EClass polilyneEClass = null; + + /** + * + * + * @generated + */ + private EClass ellipseEClass = null; + + /** + * + * + * @generated + */ + private EEnum papyrusKeyEnumerationEEnum = null; + + /** + * + * + * @generated + */ + private EDataType pointEDataType = null; + + /** + * + * + * @generated + */ + private EDataType dimensionEDataType = null; + + /** + * + * + * @generated + */ + private EDataType doubleEDataType = null; + + /** + * + * + * @generated + */ + private EDataType rgbEDataType = null; + + /** + * + * + * @generated + */ + private EDataType stringEDataType = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI + * value. + *

    + * Note: the correct way to create the package is via the static factory method {@link #init + * init()}, which also performs initialization of the package, or returns the registered + * package, if one already exists. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.conversion.di2.Di2Package#eNS_URI + * @see #init() + * @generated + */ + private Di2PackageImpl() { + super(eNS_URI, Di2Factory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others + * upon which it depends. Simple dependencies are satisfied by calling this method on all + * dependent packages before doing anything else. This method drives initialization for + * interdependent packages directly, in parallel with this package, itself. + *

    + * Of this package and its interdependencies, all packages which have not yet been registered by + * their URI values are first created and registered. The packages are then initialized in two + * steps: meta-model objects for all of the packages are created before any are initialized, + * since one package's meta-model objects may refer to those of another. + *

    + * Invocation of this method will not affect any packages that have already been initialized. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static Di2Package init() { + if (isInited) + return (Di2Package) EPackage.Registry.INSTANCE.getEPackage(Di2Package.eNS_URI); + + // Obtain or create and register package + Di2PackageImpl theDi2Package = (Di2PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Di2PackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(eNS_URI) + : new Di2PackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + UMLPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theDi2Package.createPackageContents(); + + // Initialize created meta-data + theDi2Package.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theDi2Package.freeze(); + + return theDi2Package; + } + + /** + * + * + * @generated + */ + public EClass getDiagramElement() { + return diagramElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getDiagramElement_Property() { + return (EReference) diagramElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_IsVisible() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDiagramElement_Reference() { + return (EReference) diagramElementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDiagramElement_Container() { + return (EReference) diagramElementEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_FontFamily() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_FontSize() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_LineStyle() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_LineThickness() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_FontColor() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_ForegroundColor() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_BackgroundColor() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_BorderColor() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramElement_Translucent() { + return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EReference getDiagramElement_SemanticParent() { + return (EReference) diagramElementEClass.getEStructuralFeatures().get(13); + } + + /** + * + * + * @generated + */ + public EReference getDiagramElement_SemanticChild() { + return (EReference) diagramElementEClass.getEStructuralFeatures().get(14); + } + + /** + * + * + * @generated + */ + public EClass getGraphElement() { + return graphElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getGraphElement_Contained() { + return (EReference) graphElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGraphElement_Link() { + return (EReference) graphElementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getGraphElement_SemanticModel() { + return (EReference) graphElementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGraphElement_Position() { + return (EAttribute) graphElementEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getGraphElement_Anchorage() { + return (EReference) graphElementEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getReference() { + return referenceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getReference_IsIndividualRepresentation() { + return (EAttribute) referenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getReference_Referenced() { + return (EReference) referenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getProperty() { + return propertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getProperty_Key() { + return (EAttribute) propertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getProperty_Value() { + return (EAttribute) propertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGraphEdge() { + return graphEdgeEClass; + } + + /** + * + * + * @generated + */ + public EReference getGraphEdge_Anchor() { + return (EReference) graphEdgeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGraphEdge_Waypoints() { + return (EAttribute) graphEdgeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGraphConnector() { + return graphConnectorEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGraphConnector_Position() { + return (EAttribute) graphConnectorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGraphConnector_GraphEdge() { + return (EReference) graphConnectorEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getGraphConnector_GraphElement() { + return (EReference) graphConnectorEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getGraphNode() { + return graphNodeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGraphNode_Size() { + return (EAttribute) graphNodeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDiagramLink() { + return diagramLinkEClass; + } + + /** + * + * + * @generated + */ + public EReference getDiagramLink_Diagram() { + return (EReference) diagramLinkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramLink_Zoom() { + return (EAttribute) diagramLinkEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagramLink_Viewport() { + return (EAttribute) diagramLinkEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getDiagramLink_GraphElement() { + return (EReference) diagramLinkEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getDiagram() { + return diagramEClass; + } + + /** + * + * + * @generated + */ + public EReference getDiagram_Owner() { + return (EReference) diagramEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagram_Name() { + return (EAttribute) diagramEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagram_Zoom() { + return (EAttribute) diagramEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagram_Viewport() { + return (EAttribute) diagramEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getDiagram_DiagramLink() { + return (EReference) diagramEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getDiagram_Type() { + return (EAttribute) diagramEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getSemanticModelBridge() { + return semanticModelBridgeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSemanticModelBridge_Presentation() { + return (EAttribute) semanticModelBridgeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSemanticModelBridge_GraphElement() { + return (EReference) semanticModelBridgeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSimpleSemanticModelElement() { + return simpleSemanticModelElementEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSimpleSemanticModelElement_Typeinfo() { + return (EAttribute) simpleSemanticModelElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getUml1SemanticModelBridge() { + return uml1SemanticModelBridgeEClass; + } + + /** + * + * + * @generated + */ + public EReference getUml1SemanticModelBridge_Element() { + return (EReference) uml1SemanticModelBridgeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCoreSemanticModelBridge() { + return coreSemanticModelBridgeEClass; + } + + /** + * + * + * @generated + */ + public EClass getLeafElement() { + return leafElementEClass; + } + + /** + * + * + * @generated + */ + public EClass getTextElement() { + return textElementEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTextElement_Text() { + return (EAttribute) textElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getImage() { + return imageEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Uri() { + return (EAttribute) imageEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getImage_MimeType() { + return (EAttribute) imageEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGraphicPrimitive() { + return graphicPrimitiveEClass; + } + + /** + * + * + * @generated + */ + public EClass getPolilyne() { + return polilyneEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPolilyne_Waypoints() { + return (EAttribute) polilyneEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getPolilyne_Closed() { + return (EAttribute) polilyneEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getEllipse() { + return ellipseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_Center() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_RadiusX() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_RadiusY() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_Rotation() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_StartAngle() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getEllipse_EndAngle() { + return (EAttribute) ellipseEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EEnum getPapyrusKeyEnumeration() { + return papyrusKeyEnumerationEEnum; + } + + /** + * + * + * @generated + */ + public EDataType getPoint() { + return pointEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getDimension() { + return dimensionEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getDouble() { + return doubleEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getRGB() { + return rgbEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getString() { + return stringEDataType; + } + + /** + * + * + * @generated + */ + public Di2Factory getDi2Factory() { + return (Di2Factory) getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is guarded to have no affect on + * any invocation but its first. + * + * @generated + */ + public void createPackageContents() { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + diagramElementEClass = createEClass(DIAGRAM_ELEMENT); + createEReference(diagramElementEClass, DIAGRAM_ELEMENT__PROPERTY); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__IS_VISIBLE); + createEReference(diagramElementEClass, DIAGRAM_ELEMENT__REFERENCE); + createEReference(diagramElementEClass, DIAGRAM_ELEMENT__CONTAINER); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_FAMILY); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_SIZE); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__LINE_STYLE); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__LINE_THICKNESS); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_COLOR); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FOREGROUND_COLOR); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__BACKGROUND_COLOR); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__BORDER_COLOR); + createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__TRANSLUCENT); + createEReference(diagramElementEClass, DIAGRAM_ELEMENT__SEMANTIC_PARENT); + createEReference(diagramElementEClass, DIAGRAM_ELEMENT__SEMANTIC_CHILD); + + graphElementEClass = createEClass(GRAPH_ELEMENT); + createEReference(graphElementEClass, GRAPH_ELEMENT__CONTAINED); + createEReference(graphElementEClass, GRAPH_ELEMENT__LINK); + createEReference(graphElementEClass, GRAPH_ELEMENT__SEMANTIC_MODEL); + createEAttribute(graphElementEClass, GRAPH_ELEMENT__POSITION); + createEReference(graphElementEClass, GRAPH_ELEMENT__ANCHORAGE); + + referenceEClass = createEClass(REFERENCE); + createEAttribute(referenceEClass, REFERENCE__IS_INDIVIDUAL_REPRESENTATION); + createEReference(referenceEClass, REFERENCE__REFERENCED); + + propertyEClass = createEClass(PROPERTY); + createEAttribute(propertyEClass, PROPERTY__KEY); + createEAttribute(propertyEClass, PROPERTY__VALUE); + + graphEdgeEClass = createEClass(GRAPH_EDGE); + createEReference(graphEdgeEClass, GRAPH_EDGE__ANCHOR); + createEAttribute(graphEdgeEClass, GRAPH_EDGE__WAYPOINTS); + + graphConnectorEClass = createEClass(GRAPH_CONNECTOR); + createEAttribute(graphConnectorEClass, GRAPH_CONNECTOR__POSITION); + createEReference(graphConnectorEClass, GRAPH_CONNECTOR__GRAPH_EDGE); + createEReference(graphConnectorEClass, GRAPH_CONNECTOR__GRAPH_ELEMENT); + + graphNodeEClass = createEClass(GRAPH_NODE); + createEAttribute(graphNodeEClass, GRAPH_NODE__SIZE); + + diagramLinkEClass = createEClass(DIAGRAM_LINK); + createEReference(diagramLinkEClass, DIAGRAM_LINK__DIAGRAM); + createEAttribute(diagramLinkEClass, DIAGRAM_LINK__ZOOM); + createEAttribute(diagramLinkEClass, DIAGRAM_LINK__VIEWPORT); + createEReference(diagramLinkEClass, DIAGRAM_LINK__GRAPH_ELEMENT); + + diagramEClass = createEClass(DIAGRAM); + createEReference(diagramEClass, DIAGRAM__OWNER); + createEAttribute(diagramEClass, DIAGRAM__NAME); + createEAttribute(diagramEClass, DIAGRAM__ZOOM); + createEAttribute(diagramEClass, DIAGRAM__VIEWPORT); + createEReference(diagramEClass, DIAGRAM__DIAGRAM_LINK); + createEAttribute(diagramEClass, DIAGRAM__TYPE); + + semanticModelBridgeEClass = createEClass(SEMANTIC_MODEL_BRIDGE); + createEAttribute(semanticModelBridgeEClass, SEMANTIC_MODEL_BRIDGE__PRESENTATION); + createEReference(semanticModelBridgeEClass, SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT); + + simpleSemanticModelElementEClass = createEClass(SIMPLE_SEMANTIC_MODEL_ELEMENT); + createEAttribute(simpleSemanticModelElementEClass, SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO); + + uml1SemanticModelBridgeEClass = createEClass(UML1_SEMANTIC_MODEL_BRIDGE); + createEReference(uml1SemanticModelBridgeEClass, UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT); + + coreSemanticModelBridgeEClass = createEClass(CORE_SEMANTIC_MODEL_BRIDGE); + + leafElementEClass = createEClass(LEAF_ELEMENT); + + textElementEClass = createEClass(TEXT_ELEMENT); + createEAttribute(textElementEClass, TEXT_ELEMENT__TEXT); + + imageEClass = createEClass(IMAGE); + createEAttribute(imageEClass, IMAGE__URI); + createEAttribute(imageEClass, IMAGE__MIME_TYPE); + + graphicPrimitiveEClass = createEClass(GRAPHIC_PRIMITIVE); + + polilyneEClass = createEClass(POLILYNE); + createEAttribute(polilyneEClass, POLILYNE__WAYPOINTS); + createEAttribute(polilyneEClass, POLILYNE__CLOSED); + + ellipseEClass = createEClass(ELLIPSE); + createEAttribute(ellipseEClass, ELLIPSE__CENTER); + createEAttribute(ellipseEClass, ELLIPSE__RADIUS_X); + createEAttribute(ellipseEClass, ELLIPSE__RADIUS_Y); + createEAttribute(ellipseEClass, ELLIPSE__ROTATION); + createEAttribute(ellipseEClass, ELLIPSE__START_ANGLE); + createEAttribute(ellipseEClass, ELLIPSE__END_ANGLE); + + // Create enums + papyrusKeyEnumerationEEnum = createEEnum(PAPYRUS_KEY_ENUMERATION); + + // Create data types + pointEDataType = createEDataType(POINT); + dimensionEDataType = createEDataType(DIMENSION); + doubleEDataType = createEDataType(DOUBLE); + rgbEDataType = createEDataType(RGB); + stringEDataType = createEDataType(STRING); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This method is guarded to have + * no affect on any invocation but its first. + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + graphElementEClass.getESuperTypes().add(this.getDiagramElement()); + referenceEClass.getESuperTypes().add(this.getDiagramElement()); + graphEdgeEClass.getESuperTypes().add(this.getGraphElement()); + graphNodeEClass.getESuperTypes().add(this.getGraphElement()); + diagramEClass.getESuperTypes().add(this.getGraphNode()); + simpleSemanticModelElementEClass.getESuperTypes().add(this.getSemanticModelBridge()); + uml1SemanticModelBridgeEClass.getESuperTypes().add(this.getSemanticModelBridge()); + coreSemanticModelBridgeEClass.getESuperTypes().add(this.getSemanticModelBridge()); + leafElementEClass.getESuperTypes().add(this.getDiagramElement()); + textElementEClass.getESuperTypes().add(this.getLeafElement()); + imageEClass.getESuperTypes().add(this.getLeafElement()); + graphicPrimitiveEClass.getESuperTypes().add(this.getLeafElement()); + polilyneEClass.getESuperTypes().add(this.getGraphicPrimitive()); + ellipseEClass.getESuperTypes().add(this.getGraphicPrimitive()); + + // Initialize classes and features; add operations and parameters + initEClass(diagramElementEClass, DiagramElement.class, "DiagramElement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getDiagramElement_Property(), this.getProperty(), null, "property", null, 0, -1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + /* + initEAttribute(getDiagramElement_IsVisible(), theUMLPackage.getBoolean(), "isVisible", null, 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + */ + initEReference(getDiagramElement_Reference(), this.getReference(), null, "reference", null, 0, -1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDiagramElement_Container(), this.getGraphElement(), this.getGraphElement_Contained(), + "container", null, 0, 1, DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + /* + initEAttribute(getDiagramElement_FontFamily(), theUMLPackage.getString(), "fontFamily", "", 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_FontSize(), theUMLPackage.getInteger(), "fontSize", "10", 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_LineStyle(), theUMLPackage.getString(), "lineStyle", "", 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_LineThickness(), theUMLPackage.getInteger(), "lineThickness", "1", 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + */ + initEAttribute(getDiagramElement_FontColor(), this.getRGB(), "fontColor", null, 0, 1, DiagramElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_ForegroundColor(), this.getRGB(), "foregroundColor", null, 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_BackgroundColor(), this.getRGB(), "backgroundColor", null, 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramElement_BorderColor(), this.getRGB(), "borderColor", null, 0, 1, DiagramElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + /* + initEAttribute(getDiagramElement_Translucent(), theUMLPackage.getBoolean(), "translucent", null, 0, 1, + DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + */ + initEReference(getDiagramElement_SemanticParent(), this.getDiagramElement(), this + .getDiagramElement_SemanticChild(), "semanticParent", null, 0, 1, DiagramElement.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getDiagramElement_SemanticChild(), this.getDiagramElement(), this + .getDiagramElement_SemanticParent(), "semanticChild", null, 0, -1, DiagramElement.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + EOperation op = addEOperation(diagramElementEClass, this.getProperty(), "getProperty", 0, 1, IS_UNIQUE, + IS_ORDERED); + /* + addEParameter(op, theUMLPackage.getString(), "key", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(diagramElementEClass, this.getString(), "getPropertyValue", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, theUMLPackage.getString(), "key", 0, 1, IS_UNIQUE, IS_ORDERED); + + addEOperation(diagramElementEClass, theUMLPackage.getString(), "getEditpartName", 0, 1, IS_UNIQUE, IS_ORDERED); + */ + initEClass(graphElementEClass, GraphElement.class, "GraphElement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getGraphElement_Contained(), this.getDiagramElement(), this.getDiagramElement_Container(), + "contained", null, 0, -1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGraphElement_Link(), this.getDiagramLink(), null, "link", null, 0, -1, GraphElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGraphElement_SemanticModel(), this.getSemanticModelBridge(), null, "semanticModel", null, 0, + 1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGraphElement_Position(), this.getPoint(), "position", null, 0, 1, GraphElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGraphElement_Anchorage(), this.getGraphConnector(), this.getGraphConnector_GraphElement(), + "anchorage", null, 0, -1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(referenceEClass, Reference.class, "Reference", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + /* + initEAttribute(getReference_IsIndividualRepresentation(), theUMLPackage.getBoolean(), + "isIndividualRepresentation", null, 0, 1, Reference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getReference_Referenced(), this.getDiagramElement(), null, "referenced", null, 1, 1, + Reference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProperty_Key(), theUMLPackage.getString(), "key", null, 0, 1, Property.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProperty_Value(), theUMLPackage.getString(), "value", null, 0, 1, Property.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + */ + initEClass(graphEdgeEClass, GraphEdge.class, "GraphEdge", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getGraphEdge_Anchor(), this.getGraphConnector(), this.getGraphConnector_GraphEdge(), "anchor", + null, 0, 2, GraphEdge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGraphEdge_Waypoints(), this.getPoint(), "waypoints", "", 0, -1, GraphEdge.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + addEOperation(graphEdgeEClass, this.getGraphElement(), "getAnchorSource", 0, 1, IS_UNIQUE, IS_ORDERED); + + addEOperation(graphEdgeEClass, this.getGraphElement(), "getAnchorTarget", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(graphEdgeEClass, null, "setAnchorSource", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getGraphElement(), "value", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(graphEdgeEClass, null, "setAnchorTarget", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getGraphElement(), "value", 0, 1, IS_UNIQUE, IS_ORDERED); + + addEOperation(graphEdgeEClass, null, "initConnectors", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(graphConnectorEClass, GraphConnector.class, "GraphConnector", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGraphConnector_Position(), this.getPoint(), "position", null, 0, 1, GraphConnector.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGraphConnector_GraphEdge(), this.getGraphEdge(), this.getGraphEdge_Anchor(), "graphEdge", + null, 0, -1, GraphConnector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGraphConnector_GraphElement(), this.getGraphElement(), this.getGraphElement_Anchorage(), + "graphElement", null, 1, 1, GraphConnector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(graphNodeEClass, GraphNode.class, "GraphNode", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGraphNode_Size(), this.getDimension(), "size", null, 0, 1, GraphNode.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(diagramLinkEClass, DiagramLink.class, "DiagramLink", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getDiagramLink_Diagram(), this.getDiagram(), null, "diagram", null, 1, 1, DiagramLink.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramLink_Zoom(), this.getDouble(), "zoom", null, 0, 1, DiagramLink.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagramLink_Viewport(), this.getPoint(), "viewport", null, 0, 1, DiagramLink.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDiagramLink_GraphElement(), this.getGraphElement(), null, "graphElement", null, 1, 1, + DiagramLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(diagramEClass, Diagram.class, "Diagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDiagram_Owner(), this.getSemanticModelBridge(), null, "owner", null, 1, 1, Diagram.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + /* + initEAttribute(getDiagram_Name(), theUMLPackage.getString(), "name", null, 0, 1, Diagram.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagram_Zoom(), this.getDouble(), "zoom", null, 0, 1, Diagram.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagram_Viewport(), this.getPoint(), "viewport", null, 0, 1, Diagram.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDiagram_DiagramLink(), this.getDiagramLink(), null, "diagramLink", null, 0, -1, + Diagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDiagram_Type(), theUMLPackage.getString(), "type", null, 0, 1, Diagram.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(semanticModelBridgeEClass, SemanticModelBridge.class, "SemanticModelBridge", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSemanticModelBridge_Presentation(), theUMLPackage.getString(), "presentation", null, 0, 1, + SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSemanticModelBridge_GraphElement(), this.getGraphElement(), null, "graphElement", null, 0, 1, + SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(simpleSemanticModelElementEClass, SimpleSemanticModelElement.class, "SimpleSemanticModelElement", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSimpleSemanticModelElement_Typeinfo(), theUMLPackage.getString(), "typeinfo", null, 0, 1, + SimpleSemanticModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + */ + + initEClass(uml1SemanticModelBridgeEClass, Uml1SemanticModelBridge.class, "Uml1SemanticModelBridge", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getUml1SemanticModelBridge_Element(), theUMLPackage.getElement(), null, "element", null, 0, 1, + Uml1SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(coreSemanticModelBridgeEClass, CoreSemanticModelBridge.class, "CoreSemanticModelBridge", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(leafElementEClass, LeafElement.class, "LeafElement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + + initEClass(textElementEClass, TextElement.class, "TextElement", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + /* + initEAttribute(getTextElement_Text(), theUMLPackage.getString(), "text", null, 0, 1, TextElement.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getImage_Uri(), theUMLPackage.getString(), "uri", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImage_MimeType(), theUMLPackage.getString(), "mimeType", null, 0, 1, Image.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(graphicPrimitiveEClass, GraphicPrimitive.class, "GraphicPrimitive", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + */ + initEClass(polilyneEClass, Polilyne.class, "Polilyne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPolilyne_Waypoints(), this.getPoint(), "waypoints", null, 2, -1, Polilyne.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + /* + initEAttribute(getPolilyne_Closed(), theUMLPackage.getBoolean(), "closed", null, 2, -1, Polilyne.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + */ + + initEClass(ellipseEClass, Ellipse.class, "Ellipse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEllipse_Center(), this.getPoint(), "center", null, 0, 1, Ellipse.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEllipse_RadiusX(), this.getDouble(), "radiusX", null, 0, 1, Ellipse.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEllipse_RadiusY(), this.getDouble(), "radiusY", null, 0, 1, Ellipse.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEllipse_Rotation(), this.getDouble(), "rotation", null, 0, 1, Ellipse.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEllipse_StartAngle(), this.getDouble(), "startAngle", null, 0, 1, Ellipse.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getEllipse_EndAngle(), this.getDouble(), "endAngle", null, 0, 1, Ellipse.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(papyrusKeyEnumerationEEnum, PapyrusKeyEnumeration.class, "PapyrusKeyEnumeration"); + addEEnumLiteral(papyrusKeyEnumerationEEnum, PapyrusKeyEnumeration.PAPYRUSEDITPART); + + // Initialize data types + initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(dimensionEDataType, Dimension.class, "Dimension", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(doubleEDataType, double.class, "Double", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(rgbEDataType, org.eclipse.swt.graphics.RGB.class, "RGB", IS_SERIALIZABLE, + !IS_GENERATED_INSTANCE_CLASS); + initEDataType(stringEDataType, String.class, "String", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} // Di2PackageImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java new file mode 100644 index 00000000000..c5460ff05e4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java @@ -0,0 +1,1048 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.DiagramElement; +import org.eclipse.papyrus.conversion.di2.GraphElement; +import org.eclipse.papyrus.conversion.di2.Property; +import org.eclipse.papyrus.conversion.di2.Reference; +import org.eclipse.swt.graphics.RGB; + +/** + * An implementation of the model object 'Diagram Element'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getProperty + * Property}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#isIsVisible Is + * Visible}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getReference + * Reference}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getContainer + * Container}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontFamily Font + * Family}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontSize Font + * Size}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getLineStyle Line + * Style}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getLineThickness + * Line Thickness}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontColor Font + * Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getForegroundColor + * Foreground Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getBackgroundColor + * Background Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getBorderColor + * Border Color}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#isTranslucent + * Translucent}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getSemanticParent + * Semantic Parent}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getSemanticChild + * Semantic Child}
    • + *
    + *

    + * + * @generated + */ +public class DiagramElementImpl extends EObjectImpl implements DiagramElement { + + /** + * The cached value of the '{@link #getProperty() Property}' containment reference + * list. + * + * @see #getProperty() + * @generated + * @ordered + */ + protected EList property; + + /** + * The default value of the '{@link #isIsVisible() Is Visible}' attribute. + * + * @see #isIsVisible() + * @generated + * @ordered + */ + protected static final boolean IS_VISIBLE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsVisible() Is Visible}' attribute. + * + * @see #isIsVisible() + * @generated + * @ordered + */ + protected boolean isVisible = IS_VISIBLE_EDEFAULT; + + /** + * The cached value of the '{@link #getReference() Reference}' reference list. + * + * @see #getReference() + * @generated + * @ordered + */ + protected EList reference; + + /** + * The default value of the '{@link #getFontFamily() Font Family}' attribute. + * + * @see #getFontFamily() + * @generated + * @ordered + */ + protected static final String FONT_FAMILY_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getFontFamily() Font Family}' attribute. + * + * @see #getFontFamily() + * @generated + * @ordered + */ + protected String fontFamily = FONT_FAMILY_EDEFAULT; + + /** + * The default value of the '{@link #getFontSize() Font Size}' attribute. + * + * @see #getFontSize() + * @generated + * @ordered + */ + protected static final int FONT_SIZE_EDEFAULT = 10; + + /** + * The cached value of the '{@link #getFontSize() Font Size}' attribute. + * + * @see #getFontSize() + * @generated + * @ordered + */ + protected int fontSize = FONT_SIZE_EDEFAULT; + + /** + * The default value of the '{@link #getLineStyle() Line Style}' attribute. + * + * @see #getLineStyle() + * @generated + * @ordered + */ + protected static final String LINE_STYLE_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getLineStyle() Line Style}' attribute. + * + * @see #getLineStyle() + * @generated + * @ordered + */ + protected String lineStyle = LINE_STYLE_EDEFAULT; + + /** + * The default value of the '{@link #getLineThickness() Line Thickness}' attribute. + * + * + * @see #getLineThickness() + * @generated + * @ordered + */ + protected static final int LINE_THICKNESS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getLineThickness() Line Thickness}' attribute. + * + * @see #getLineThickness() + * @generated + * @ordered + */ + protected int lineThickness = LINE_THICKNESS_EDEFAULT; + + /** + * The default value of the '{@link #getFontColor() Font Color}' attribute. + * + * @see #getFontColor() + * @generated + * @ordered + */ + protected static final RGB FONT_COLOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFontColor() Font Color}' attribute. + * + * @see #getFontColor() + * @generated + * @ordered + */ + protected RGB fontColor = FONT_COLOR_EDEFAULT; + + /** + * The default value of the '{@link #getForegroundColor() Foreground Color}' attribute. + * + * + * @see #getForegroundColor() + * @generated + * @ordered + */ + protected static final RGB FOREGROUND_COLOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getForegroundColor() Foreground Color}' attribute. + * + * + * @see #getForegroundColor() + * @generated + * @ordered + */ + protected RGB foregroundColor = FOREGROUND_COLOR_EDEFAULT; + + /** + * The default value of the '{@link #getBackgroundColor() Background Color}' attribute. + * + * + * @see #getBackgroundColor() + * @generated + * @ordered + */ + protected static final RGB BACKGROUND_COLOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBackgroundColor() Background Color}' attribute. + * + * + * @see #getBackgroundColor() + * @generated + * @ordered + */ + protected RGB backgroundColor = BACKGROUND_COLOR_EDEFAULT; + + /** + * The default value of the '{@link #getBorderColor() Border Color}' attribute. + * + * @see #getBorderColor() + * @generated + * @ordered + */ + protected static final RGB BORDER_COLOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBorderColor() Border Color}' attribute. + * + * @see #getBorderColor() + * @generated + * @ordered + */ + protected RGB borderColor = BORDER_COLOR_EDEFAULT; + + /** + * The default value of the '{@link #isTranslucent() Translucent}' attribute. + * + * @see #isTranslucent() + * @generated + * @ordered + */ + protected static final boolean TRANSLUCENT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isTranslucent() Translucent}' attribute. + * + * @see #isTranslucent() + * @generated + * @ordered + */ + protected boolean translucent = TRANSLUCENT_EDEFAULT; + + /** + * The cached value of the '{@link #getSemanticParent() Semantic Parent}' reference. + * + * + * @see #getSemanticParent() + * @generated + * @ordered + */ + protected DiagramElement semanticParent; + + /** + * The cached value of the '{@link #getSemanticChild() Semantic Child}' reference list. + * + * + * @see #getSemanticChild() + * @generated + * @ordered + */ + protected EList semanticChild; + + /** + * + * + * @generated + */ + protected DiagramElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.DIAGRAM_ELEMENT; + } + + /** + * + * + * @generated + */ + public EList getProperty() { + if (property == null) { + property = new EObjectContainmentEList(Property.class, this, Di2Package.DIAGRAM_ELEMENT__PROPERTY); + } + return property; + } + + /** + * + * + * @generated + */ + public boolean isIsVisible() { + return isVisible; + } + + /** + * + * + * @generated + */ + public void setIsVisible(boolean newIsVisible) { + boolean oldIsVisible = isVisible; + isVisible = newIsVisible; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE, oldIsVisible, + isVisible)); + } + + /** + * + * + * @generated + */ + public EList getReference() { + if (reference == null) { + reference = new EObjectResolvingEList(Reference.class, this, + Di2Package.DIAGRAM_ELEMENT__REFERENCE); + } + return reference; + } + + /** + * + * + * @generated + */ + public GraphElement getContainer() { + if (eContainerFeatureID != Di2Package.DIAGRAM_ELEMENT__CONTAINER) + return null; + return (GraphElement) eContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetContainer(GraphElement newContainer, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newContainer, Di2Package.DIAGRAM_ELEMENT__CONTAINER, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setContainer(GraphElement newContainer) { + if (newContainer != eInternalContainer() + || (eContainerFeatureID != Di2Package.DIAGRAM_ELEMENT__CONTAINER && newContainer != null)) { + if (EcoreUtil.isAncestor(this, newContainer)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newContainer != null) + msgs = ((InternalEObject) newContainer).eInverseAdd(this, Di2Package.GRAPH_ELEMENT__CONTAINED, + GraphElement.class, msgs); + msgs = basicSetContainer(newContainer, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__CONTAINER, newContainer, + newContainer)); + } + + /** + * + * + * @generated + */ + public String getFontFamily() { + return fontFamily; + } + + /** + * + * + * @generated + */ + public void setFontFamily(String newFontFamily) { + String oldFontFamily = fontFamily; + fontFamily = newFontFamily; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY, + oldFontFamily, fontFamily)); + } + + /** + * + * + * @generated + */ + public int getFontSize() { + return fontSize; + } + + /** + * + * + * @generated + */ + public void setFontSize(int newFontSize) { + int oldFontSize = fontSize; + fontSize = newFontSize; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_SIZE, oldFontSize, + fontSize)); + } + + /** + * + * + * @generated + */ + public String getLineStyle() { + return lineStyle; + } + + /** + * + * + * @generated + */ + public void setLineStyle(String newLineStyle) { + String oldLineStyle = lineStyle; + lineStyle = newLineStyle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__LINE_STYLE, oldLineStyle, + lineStyle)); + } + + /** + * + * + * @generated + */ + public int getLineThickness() { + return lineThickness; + } + + /** + * + * + * @generated + */ + public void setLineThickness(int newLineThickness) { + int oldLineThickness = lineThickness; + lineThickness = newLineThickness; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS, + oldLineThickness, lineThickness)); + } + + /** + * + * + * @generated + */ + public RGB getFontColor() { + return fontColor; + } + + /** + * + * + * @generated + */ + public void setFontColor(RGB newFontColor) { + RGB oldFontColor = fontColor; + fontColor = newFontColor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_COLOR, oldFontColor, + fontColor)); + } + + /** + * + * + * @generated + */ + public RGB getForegroundColor() { + return foregroundColor; + } + + /** + * + * + * @generated + */ + public void setForegroundColor(RGB newForegroundColor) { + RGB oldForegroundColor = foregroundColor; + foregroundColor = newForegroundColor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR, + oldForegroundColor, foregroundColor)); + } + + /** + * + * + * @generated + */ + public RGB getBackgroundColor() { + return backgroundColor; + } + + /** + * + * + * @generated + */ + public void setBackgroundColor(RGB newBackgroundColor) { + RGB oldBackgroundColor = backgroundColor; + backgroundColor = newBackgroundColor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR, + oldBackgroundColor, backgroundColor)); + } + + /** + * + * + * @generated + */ + public RGB getBorderColor() { + return borderColor; + } + + /** + * + * + * @generated + */ + public void setBorderColor(RGB newBorderColor) { + RGB oldBorderColor = borderColor; + borderColor = newBorderColor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR, + oldBorderColor, borderColor)); + } + + /** + * + * + * @generated + */ + public boolean isTranslucent() { + return translucent; + } + + /** + * + * + * @generated + */ + public void setTranslucent(boolean newTranslucent) { + boolean oldTranslucent = translucent; + translucent = newTranslucent; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT, + oldTranslucent, translucent)); + } + + /** + * + * + * @generated + */ + public DiagramElement getSemanticParent() { + if (semanticParent != null && semanticParent.eIsProxy()) { + InternalEObject oldSemanticParent = (InternalEObject) semanticParent; + semanticParent = (DiagramElement) eResolveProxy(oldSemanticParent); + if (semanticParent != oldSemanticParent) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, oldSemanticParent, semanticParent)); + } + } + return semanticParent; + } + + /** + * + * + * @generated + */ + public DiagramElement basicGetSemanticParent() { + return semanticParent; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSemanticParent(DiagramElement newSemanticParent, NotificationChain msgs) { + DiagramElement oldSemanticParent = semanticParent; + semanticParent = newSemanticParent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, oldSemanticParent, newSemanticParent); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSemanticParent(DiagramElement newSemanticParent) { + if (newSemanticParent != semanticParent) { + NotificationChain msgs = null; + if (semanticParent != null) + msgs = ((InternalEObject) semanticParent).eInverseRemove(this, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); + if (newSemanticParent != null) + msgs = ((InternalEObject) newSemanticParent).eInverseAdd(this, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); + msgs = basicSetSemanticParent(newSemanticParent, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, + newSemanticParent, newSemanticParent)); + } + + /** + * + * + * @generated + */ + public EList getSemanticChild() { + if (semanticChild == null) { + semanticChild = new EObjectWithInverseResolvingEList(DiagramElement.class, this, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT); + } + return semanticChild; + } + + /** + * + * + * @generated + */ + public Property getProperty(String key) { + java.util.Iterator it = getProperty().iterator(); + while (it.hasNext()) { + Property element = (Property) it.next(); + if (key.equals(element.getKey())) { + return element; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getPropertyValue(String key) { + if (this.getProperty(key) != null) { + return this.getProperty(key).getValue(); + } + return null; + + } + + /** + * + * + * @generated + */ + public String getEditpartName() { + return this.getPropertyValue(org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration.PAPYRUSEDITPART + .getLiteral()); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetContainer((GraphElement) otherEnd, msgs); + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + if (semanticParent != null) + msgs = ((InternalEObject) semanticParent).eInverseRemove(this, + Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); + return basicSetSemanticParent((DiagramElement) otherEnd, msgs); + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + return ((InternalEList) (InternalEList) getSemanticChild()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__PROPERTY: + return ((InternalEList) getProperty()).basicRemove(otherEnd, msgs); + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + return basicSetContainer(null, msgs); + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + return basicSetSemanticParent(null, msgs); + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + return ((InternalEList) getSemanticChild()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID) { + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + return eInternalContainer().eInverseRemove(this, Di2Package.GRAPH_ELEMENT__CONTAINED, GraphElement.class, + msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__PROPERTY: + return getProperty(); + case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: + return isIsVisible() ? Boolean.TRUE : Boolean.FALSE; + case Di2Package.DIAGRAM_ELEMENT__REFERENCE: + return getReference(); + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + return getContainer(); + case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: + return getFontFamily(); + case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: + return new Integer(getFontSize()); + case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: + return getLineStyle(); + case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: + return new Integer(getLineThickness()); + case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: + return getFontColor(); + case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: + return getForegroundColor(); + case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: + return getBackgroundColor(); + case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: + return getBorderColor(); + case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: + return isTranslucent() ? Boolean.TRUE : Boolean.FALSE; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + if (resolve) + return getSemanticParent(); + return basicGetSemanticParent(); + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + return getSemanticChild(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__PROPERTY: + getProperty().clear(); + getProperty().addAll((Collection) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: + setIsVisible(((Boolean) newValue).booleanValue()); + return; + case Di2Package.DIAGRAM_ELEMENT__REFERENCE: + getReference().clear(); + getReference().addAll((Collection) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + setContainer((GraphElement) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: + setFontFamily((String) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: + setFontSize(((Integer) newValue).intValue()); + return; + case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: + setLineStyle((String) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: + setLineThickness(((Integer) newValue).intValue()); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: + setFontColor((RGB) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: + setForegroundColor((RGB) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: + setBackgroundColor((RGB) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: + setBorderColor((RGB) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: + setTranslucent(((Boolean) newValue).booleanValue()); + return; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + setSemanticParent((DiagramElement) newValue); + return; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + getSemanticChild().clear(); + getSemanticChild().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__PROPERTY: + getProperty().clear(); + return; + case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: + setIsVisible(IS_VISIBLE_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__REFERENCE: + getReference().clear(); + return; + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + setContainer((GraphElement) null); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: + setFontFamily(FONT_FAMILY_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: + setFontSize(FONT_SIZE_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: + setLineStyle(LINE_STYLE_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: + setLineThickness(LINE_THICKNESS_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: + setFontColor(FONT_COLOR_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: + setForegroundColor(FOREGROUND_COLOR_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: + setBackgroundColor(BACKGROUND_COLOR_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: + setBorderColor(BORDER_COLOR_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: + setTranslucent(TRANSLUCENT_EDEFAULT); + return; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + setSemanticParent((DiagramElement) null); + return; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + getSemanticChild().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM_ELEMENT__PROPERTY: + return property != null && !property.isEmpty(); + case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: + return isVisible != IS_VISIBLE_EDEFAULT; + case Di2Package.DIAGRAM_ELEMENT__REFERENCE: + return reference != null && !reference.isEmpty(); + case Di2Package.DIAGRAM_ELEMENT__CONTAINER: + return getContainer() != null; + case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: + return FONT_FAMILY_EDEFAULT == null ? fontFamily != null : !FONT_FAMILY_EDEFAULT.equals(fontFamily); + case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: + return fontSize != FONT_SIZE_EDEFAULT; + case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: + return LINE_STYLE_EDEFAULT == null ? lineStyle != null : !LINE_STYLE_EDEFAULT.equals(lineStyle); + case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: + return lineThickness != LINE_THICKNESS_EDEFAULT; + case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: + return FONT_COLOR_EDEFAULT == null ? fontColor != null : !FONT_COLOR_EDEFAULT.equals(fontColor); + case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: + return FOREGROUND_COLOR_EDEFAULT == null ? foregroundColor != null : !FOREGROUND_COLOR_EDEFAULT + .equals(foregroundColor); + case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: + return BACKGROUND_COLOR_EDEFAULT == null ? backgroundColor != null : !BACKGROUND_COLOR_EDEFAULT + .equals(backgroundColor); + case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: + return BORDER_COLOR_EDEFAULT == null ? borderColor != null : !BORDER_COLOR_EDEFAULT.equals(borderColor); + case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: + return translucent != TRANSLUCENT_EDEFAULT; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: + return semanticParent != null; + case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: + return semanticChild != null && !semanticChild.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (isVisible: "); + result.append(isVisible); + result.append(", fontFamily: "); + result.append(fontFamily); + result.append(", fontSize: "); + result.append(fontSize); + result.append(", lineStyle: "); + result.append(lineStyle); + result.append(", lineThickness: "); + result.append(lineThickness); + result.append(", fontColor: "); + result.append(fontColor); + result.append(", foregroundColor: "); + result.append(foregroundColor); + result.append(", backgroundColor: "); + result.append(backgroundColor); + result.append(", borderColor: "); + result.append(borderColor); + result.append(", translucent: "); + result.append(translucent); + result.append(')'); + return result.toString(); + } + +} // DiagramElementImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java new file mode 100644 index 00000000000..fc01dd11bdd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java @@ -0,0 +1,466 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Diagram; +import org.eclipse.papyrus.conversion.di2.DiagramLink; +import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; + +/** + * An implementation of the model object 'Diagram'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getOwner Owner}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getName Name}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getZoom Zoom}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getViewport Viewport + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getDiagramLink Diagram + * Link}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getType Type}
    • + *
    + *

    + * + * @generated + */ +public class DiagramImpl extends GraphNodeImpl implements Diagram { + + /** + * The cached value of the '{@link #getOwner() Owner}' containment reference. + * + * @see #getOwner() + * @generated + * @ordered + */ + protected SemanticModelBridge owner; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getZoom() Zoom}' attribute. + * + * @see #getZoom() + * @generated + * @ordered + */ + protected static final double ZOOM_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getZoom() Zoom}' attribute. + * + * + * @see #getZoom() + * @generated + * @ordered + */ + protected double zoom = ZOOM_EDEFAULT; + + /** + * The default value of the '{@link #getViewport() Viewport}' attribute. + * + * @see #getViewport() + * @generated + * @ordered + */ + protected static final Point VIEWPORT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getViewport() Viewport}' attribute. + * + * @see #getViewport() + * @generated + * @ordered + */ + protected Point viewport = VIEWPORT_EDEFAULT; + + /** + * The cached value of the '{@link #getDiagramLink() Diagram Link}' reference list. + * + * + * @see #getDiagramLink() + * @generated + * @ordered + */ + protected EList diagramLink; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DiagramImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.DIAGRAM; + } + + /** + * + * + * @generated + */ + public SemanticModelBridge getOwner() { + return owner; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOwner(SemanticModelBridge newOwner, NotificationChain msgs) { + SemanticModelBridge oldOwner = owner; + owner = newOwner; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__OWNER, + oldOwner, newOwner); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOwner(SemanticModelBridge newOwner) { + if (newOwner != owner) { + NotificationChain msgs = null; + if (owner != null) + msgs = ((InternalEObject) owner).eInverseRemove(this, EOPPOSITE_FEATURE_BASE + - Di2Package.DIAGRAM__OWNER, null, msgs); + if (newOwner != null) + msgs = ((InternalEObject) newOwner).eInverseAdd(this, EOPPOSITE_FEATURE_BASE + - Di2Package.DIAGRAM__OWNER, null, msgs); + msgs = basicSetOwner(newOwner, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__OWNER, newOwner, newOwner)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public double getZoom() { + return zoom; + } + + /** + * + * + * @generated + */ + public void setZoom(double newZoom) { + double oldZoom = zoom; + zoom = newZoom; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__ZOOM, oldZoom, zoom)); + } + + /** + * + * + * @generated + */ + public Point getViewport() { + return viewport; + } + + /** + * + * + * @generated + */ + public void setViewport(Point newViewport) { + Point oldViewport = viewport; + viewport = newViewport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__VIEWPORT, oldViewport, viewport)); + } + + /** + * + * + * @generated + */ + public EList getDiagramLink() { + if (diagramLink == null) { + diagramLink = new EObjectResolvingEList(DiagramLink.class, this, + Di2Package.DIAGRAM__DIAGRAM_LINK); + } + return diagramLink; + } + + /** + * + * + * @NOT generated + */ + public String getType() { + if (this.type == null || this.type.equals("")) { + return "ClassDiagram"; + } + return this.type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.DIAGRAM__OWNER: + return basicSetOwner(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.DIAGRAM__OWNER: + return getOwner(); + case Di2Package.DIAGRAM__NAME: + return getName(); + case Di2Package.DIAGRAM__ZOOM: + return new Double(getZoom()); + case Di2Package.DIAGRAM__VIEWPORT: + return getViewport(); + case Di2Package.DIAGRAM__DIAGRAM_LINK: + return getDiagramLink(); + case Di2Package.DIAGRAM__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.DIAGRAM__OWNER: + setOwner((SemanticModelBridge) newValue); + return; + case Di2Package.DIAGRAM__NAME: + setName((String) newValue); + return; + case Di2Package.DIAGRAM__ZOOM: + setZoom(((Double) newValue).doubleValue()); + return; + case Di2Package.DIAGRAM__VIEWPORT: + setViewport((Point) newValue); + return; + case Di2Package.DIAGRAM__DIAGRAM_LINK: + getDiagramLink().clear(); + getDiagramLink().addAll((Collection) newValue); + return; + case Di2Package.DIAGRAM__TYPE: + setType((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM__OWNER: + setOwner((SemanticModelBridge) null); + return; + case Di2Package.DIAGRAM__NAME: + setName(NAME_EDEFAULT); + return; + case Di2Package.DIAGRAM__ZOOM: + setZoom(ZOOM_EDEFAULT); + return; + case Di2Package.DIAGRAM__VIEWPORT: + setViewport(VIEWPORT_EDEFAULT); + return; + case Di2Package.DIAGRAM__DIAGRAM_LINK: + getDiagramLink().clear(); + return; + case Di2Package.DIAGRAM__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM__OWNER: + return owner != null; + case Di2Package.DIAGRAM__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Di2Package.DIAGRAM__ZOOM: + return zoom != ZOOM_EDEFAULT; + case Di2Package.DIAGRAM__VIEWPORT: + return VIEWPORT_EDEFAULT == null ? viewport != null : !VIEWPORT_EDEFAULT.equals(viewport); + case Di2Package.DIAGRAM__DIAGRAM_LINK: + return diagramLink != null && !diagramLink.isEmpty(); + case Di2Package.DIAGRAM__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", zoom: "); + result.append(zoom); + result.append(", viewport: "); + result.append(viewport); + result.append(", type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} // DiagramImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java new file mode 100644 index 00000000000..c49e62d7627 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java @@ -0,0 +1,356 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Diagram; +import org.eclipse.papyrus.conversion.di2.DiagramLink; +import org.eclipse.papyrus.conversion.di2.GraphElement; + +/** + * An implementation of the model object 'Diagram Link'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getDiagram Diagram + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getZoom Zoom}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getViewport Viewport + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getGraphElement Graph + * Element}
    • + *
    + *

    + * + * @generated + */ +public class DiagramLinkImpl extends EObjectImpl implements DiagramLink { + + /** + * The cached value of the '{@link #getDiagram() Diagram}' reference. + * + * @see #getDiagram() + * @generated + * @ordered + */ + protected Diagram diagram; + + /** + * The default value of the '{@link #getZoom() Zoom}' attribute. + * + * @see #getZoom() + * @generated + * @ordered + */ + protected static final double ZOOM_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getZoom() Zoom}' attribute. + * + * + * @see #getZoom() + * @generated + * @ordered + */ + protected double zoom = ZOOM_EDEFAULT; + + /** + * The default value of the '{@link #getViewport() Viewport}' attribute. + * + * @see #getViewport() + * @generated + * @ordered + */ + protected static final Point VIEWPORT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getViewport() Viewport}' attribute. + * + * @see #getViewport() + * @generated + * @ordered + */ + protected Point viewport = VIEWPORT_EDEFAULT; + + /** + * The cached value of the '{@link #getGraphElement() Graph Element}' reference. + * + * @see #getGraphElement() + * @generated + * @ordered + */ + protected GraphElement graphElement; + + /** + * + * + * @generated + */ + protected DiagramLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.DIAGRAM_LINK; + } + + /** + * + * + * @generated + */ + public Diagram getDiagram() { + if (diagram != null && diagram.eIsProxy()) { + InternalEObject oldDiagram = (InternalEObject) diagram; + diagram = (Diagram) eResolveProxy(oldDiagram); + if (diagram != oldDiagram) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.DIAGRAM_LINK__DIAGRAM, + oldDiagram, diagram)); + } + } + return diagram; + } + + /** + * + * + * @generated + */ + public Diagram basicGetDiagram() { + return diagram; + } + + /** + * + * + * @generated + */ + public void setDiagram(Diagram newDiagram) { + Diagram oldDiagram = diagram; + diagram = newDiagram; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__DIAGRAM, oldDiagram, diagram)); + } + + /** + * + * + * @generated + */ + public double getZoom() { + return zoom; + } + + /** + * + * + * @generated + */ + public void setZoom(double newZoom) { + double oldZoom = zoom; + zoom = newZoom; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__ZOOM, oldZoom, zoom)); + } + + /** + * + * + * @generated + */ + public Point getViewport() { + return viewport; + } + + /** + * + * + * @generated + */ + public void setViewport(Point newViewport) { + Point oldViewport = viewport; + viewport = newViewport; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__VIEWPORT, oldViewport, + viewport)); + } + + /** + * + * + * @generated + */ + public GraphElement getGraphElement() { + if (graphElement != null && graphElement.eIsProxy()) { + InternalEObject oldGraphElement = (InternalEObject) graphElement; + graphElement = (GraphElement) eResolveProxy(oldGraphElement); + if (graphElement != oldGraphElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT, + oldGraphElement, graphElement)); + } + } + return graphElement; + } + + /** + * + * + * @generated + */ + public GraphElement basicGetGraphElement() { + return graphElement; + } + + /** + * + * + * @generated + */ + public void setGraphElement(GraphElement newGraphElement) { + GraphElement oldGraphElement = graphElement; + graphElement = newGraphElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT, + oldGraphElement, graphElement)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.DIAGRAM_LINK__DIAGRAM: + if (resolve) + return getDiagram(); + return basicGetDiagram(); + case Di2Package.DIAGRAM_LINK__ZOOM: + return new Double(getZoom()); + case Di2Package.DIAGRAM_LINK__VIEWPORT: + return getViewport(); + case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: + if (resolve) + return getGraphElement(); + return basicGetGraphElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.DIAGRAM_LINK__DIAGRAM: + setDiagram((Diagram) newValue); + return; + case Di2Package.DIAGRAM_LINK__ZOOM: + setZoom(((Double) newValue).doubleValue()); + return; + case Di2Package.DIAGRAM_LINK__VIEWPORT: + setViewport((Point) newValue); + return; + case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: + setGraphElement((GraphElement) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM_LINK__DIAGRAM: + setDiagram((Diagram) null); + return; + case Di2Package.DIAGRAM_LINK__ZOOM: + setZoom(ZOOM_EDEFAULT); + return; + case Di2Package.DIAGRAM_LINK__VIEWPORT: + setViewport(VIEWPORT_EDEFAULT); + return; + case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: + setGraphElement((GraphElement) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.DIAGRAM_LINK__DIAGRAM: + return diagram != null; + case Di2Package.DIAGRAM_LINK__ZOOM: + return zoom != ZOOM_EDEFAULT; + case Di2Package.DIAGRAM_LINK__VIEWPORT: + return VIEWPORT_EDEFAULT == null ? viewport != null : !VIEWPORT_EDEFAULT.equals(viewport); + case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: + return graphElement != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (zoom: "); + result.append(zoom); + result.append(", viewport: "); + result.append(viewport); + result.append(')'); + return result.toString(); + } + +} // DiagramLinkImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java new file mode 100644 index 00000000000..f7bc0a3b71c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java @@ -0,0 +1,445 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Ellipse; + +/** + * An implementation of the model object 'Ellipse'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getCenter Center}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRadiusX Radius X} + *
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRadiusY Radius Y} + *
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRotation Rotation + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getStartAngle Start Angle + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getEndAngle End Angle + * }
    • + *
    + *

    + * + * @generated + */ +public class EllipseImpl extends GraphicPrimitiveImpl implements Ellipse { + + /** + * The default value of the '{@link #getCenter() Center}' attribute. + * + * @see #getCenter() + * @generated + * @ordered + */ + protected static final Point CENTER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCenter() Center}' attribute. + * + * @see #getCenter() + * @generated + * @ordered + */ + protected Point center = CENTER_EDEFAULT; + + /** + * The default value of the '{@link #getRadiusX() Radius X}' attribute. + * + * @see #getRadiusX() + * @generated + * @ordered + */ + protected static final double RADIUS_X_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getRadiusX() Radius X}' attribute. + * + * @see #getRadiusX() + * @generated + * @ordered + */ + protected double radiusX = RADIUS_X_EDEFAULT; + + /** + * The default value of the '{@link #getRadiusY() Radius Y}' attribute. + * + * @see #getRadiusY() + * @generated + * @ordered + */ + protected static final double RADIUS_Y_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getRadiusY() Radius Y}' attribute. + * + * @see #getRadiusY() + * @generated + * @ordered + */ + protected double radiusY = RADIUS_Y_EDEFAULT; + + /** + * The default value of the '{@link #getRotation() Rotation}' attribute. + * + * @see #getRotation() + * @generated + * @ordered + */ + protected static final double ROTATION_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getRotation() Rotation}' attribute. + * + * @see #getRotation() + * @generated + * @ordered + */ + protected double rotation = ROTATION_EDEFAULT; + + /** + * The default value of the '{@link #getStartAngle() Start Angle}' attribute. + * + * @see #getStartAngle() + * @generated + * @ordered + */ + protected static final double START_ANGLE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getStartAngle() Start Angle}' attribute. + * + * @see #getStartAngle() + * @generated + * @ordered + */ + protected double startAngle = START_ANGLE_EDEFAULT; + + /** + * The default value of the '{@link #getEndAngle() End Angle}' attribute. + * + * @see #getEndAngle() + * @generated + * @ordered + */ + protected static final double END_ANGLE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getEndAngle() End Angle}' attribute. + * + * @see #getEndAngle() + * @generated + * @ordered + */ + protected double endAngle = END_ANGLE_EDEFAULT; + + /** + * + * + * @generated + */ + protected EllipseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.ELLIPSE; + } + + /** + * + * + * @generated + */ + public Point getCenter() { + return center; + } + + /** + * + * + * @generated + */ + public void setCenter(Point newCenter) { + Point oldCenter = center; + center = newCenter; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__CENTER, oldCenter, center)); + } + + /** + * + * + * @generated + */ + public double getRadiusX() { + return radiusX; + } + + /** + * + * + * @generated + */ + public void setRadiusX(double newRadiusX) { + double oldRadiusX = radiusX; + radiusX = newRadiusX; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__RADIUS_X, oldRadiusX, radiusX)); + } + + /** + * + * + * @generated + */ + public double getRadiusY() { + return radiusY; + } + + /** + * + * + * @generated + */ + public void setRadiusY(double newRadiusY) { + double oldRadiusY = radiusY; + radiusY = newRadiusY; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__RADIUS_Y, oldRadiusY, radiusY)); + } + + /** + * + * + * @generated + */ + public double getRotation() { + return rotation; + } + + /** + * + * + * @generated + */ + public void setRotation(double newRotation) { + double oldRotation = rotation; + rotation = newRotation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__ROTATION, oldRotation, rotation)); + } + + /** + * + * + * @generated + */ + public double getStartAngle() { + return startAngle; + } + + /** + * + * + * @generated + */ + public void setStartAngle(double newStartAngle) { + double oldStartAngle = startAngle; + startAngle = newStartAngle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__START_ANGLE, oldStartAngle, + startAngle)); + } + + /** + * + * + * @generated + */ + public double getEndAngle() { + return endAngle; + } + + /** + * + * + * @generated + */ + public void setEndAngle(double newEndAngle) { + double oldEndAngle = endAngle; + endAngle = newEndAngle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__END_ANGLE, oldEndAngle, endAngle)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.ELLIPSE__CENTER: + return getCenter(); + case Di2Package.ELLIPSE__RADIUS_X: + return new Double(getRadiusX()); + case Di2Package.ELLIPSE__RADIUS_Y: + return new Double(getRadiusY()); + case Di2Package.ELLIPSE__ROTATION: + return new Double(getRotation()); + case Di2Package.ELLIPSE__START_ANGLE: + return new Double(getStartAngle()); + case Di2Package.ELLIPSE__END_ANGLE: + return new Double(getEndAngle()); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.ELLIPSE__CENTER: + setCenter((Point) newValue); + return; + case Di2Package.ELLIPSE__RADIUS_X: + setRadiusX(((Double) newValue).doubleValue()); + return; + case Di2Package.ELLIPSE__RADIUS_Y: + setRadiusY(((Double) newValue).doubleValue()); + return; + case Di2Package.ELLIPSE__ROTATION: + setRotation(((Double) newValue).doubleValue()); + return; + case Di2Package.ELLIPSE__START_ANGLE: + setStartAngle(((Double) newValue).doubleValue()); + return; + case Di2Package.ELLIPSE__END_ANGLE: + setEndAngle(((Double) newValue).doubleValue()); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.ELLIPSE__CENTER: + setCenter(CENTER_EDEFAULT); + return; + case Di2Package.ELLIPSE__RADIUS_X: + setRadiusX(RADIUS_X_EDEFAULT); + return; + case Di2Package.ELLIPSE__RADIUS_Y: + setRadiusY(RADIUS_Y_EDEFAULT); + return; + case Di2Package.ELLIPSE__ROTATION: + setRotation(ROTATION_EDEFAULT); + return; + case Di2Package.ELLIPSE__START_ANGLE: + setStartAngle(START_ANGLE_EDEFAULT); + return; + case Di2Package.ELLIPSE__END_ANGLE: + setEndAngle(END_ANGLE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.ELLIPSE__CENTER: + return CENTER_EDEFAULT == null ? center != null : !CENTER_EDEFAULT.equals(center); + case Di2Package.ELLIPSE__RADIUS_X: + return radiusX != RADIUS_X_EDEFAULT; + case Di2Package.ELLIPSE__RADIUS_Y: + return radiusY != RADIUS_Y_EDEFAULT; + case Di2Package.ELLIPSE__ROTATION: + return rotation != ROTATION_EDEFAULT; + case Di2Package.ELLIPSE__START_ANGLE: + return startAngle != START_ANGLE_EDEFAULT; + case Di2Package.ELLIPSE__END_ANGLE: + return endAngle != END_ANGLE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (center: "); + result.append(center); + result.append(", radiusX: "); + result.append(radiusX); + result.append(", radiusY: "); + result.append(radiusY); + result.append(", rotation: "); + result.append(rotation); + result.append(", startAngle: "); + result.append(startAngle); + result.append(", endAngle: "); + result.append(endAngle); + result.append(')'); + return result.toString(); + } + +} // EllipseImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java new file mode 100644 index 00000000000..5974aca3472 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java @@ -0,0 +1,328 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.GraphConnector; +import org.eclipse.papyrus.conversion.di2.GraphEdge; +import org.eclipse.papyrus.conversion.di2.GraphElement; + +/** + * An implementation of the model object 'Graph Connector'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getPosition + * Position}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getGraphEdge Graph + * Edge}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getGraphElement + * Graph Element}
    • + *
    + *

    + * + * @generated + */ +public class GraphConnectorImpl extends EObjectImpl implements GraphConnector { + + /** + * The default value of the '{@link #getPosition() Position}' attribute. + * + * @see #getPosition() + * @generated + * @ordered + */ + protected static final Point POSITION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPosition() Position}' attribute. + * + * @see #getPosition() + * @generated + * @ordered + */ + protected Point position = POSITION_EDEFAULT; + + /** + * The cached value of the '{@link #getGraphEdge() Graph Edge}' reference list. + * + * @see #getGraphEdge() + * @generated + * @ordered + */ + protected EList graphEdge; + + /** + * + * + * @generated + */ + protected GraphConnectorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.GRAPH_CONNECTOR; + } + + /** + * + * + * @generated + */ + public Point getPosition() { + return position; + } + + /** + * + * + * @generated + */ + public void setPosition(Point newPosition) { + Point oldPosition = position; + position = newPosition; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_CONNECTOR__POSITION, oldPosition, + position)); + } + + /** + * + * + * @generated + */ + public EList getGraphEdge() { + if (graphEdge == null) { + graphEdge = new EObjectWithInverseResolvingEList.ManyInverse(GraphEdge.class, this, + Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE, Di2Package.GRAPH_EDGE__ANCHOR); + } + return graphEdge; + } + + /** + * + * + * @generated + */ + public GraphElement getGraphElement() { + if (eContainerFeatureID != Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT) + return null; + return (GraphElement) eContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetGraphElement(GraphElement newGraphElement, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject) newGraphElement, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setGraphElement(GraphElement newGraphElement) { + if (newGraphElement != eInternalContainer() + || (eContainerFeatureID != Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT && newGraphElement != null)) { + if (EcoreUtil.isAncestor(this, newGraphElement)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newGraphElement != null) + msgs = ((InternalEObject) newGraphElement).eInverseAdd(this, Di2Package.GRAPH_ELEMENT__ANCHORAGE, + GraphElement.class, msgs); + msgs = basicSetGraphElement(newGraphElement, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT, + newGraphElement, newGraphElement)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + return ((InternalEList) (InternalEList) getGraphEdge()).basicAdd(otherEnd, msgs); + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetGraphElement((GraphElement) otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + return ((InternalEList) getGraphEdge()).basicRemove(otherEnd, msgs); + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + return basicSetGraphElement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID) { + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + return eInternalContainer().eInverseRemove(this, Di2Package.GRAPH_ELEMENT__ANCHORAGE, GraphElement.class, + msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__POSITION: + return getPosition(); + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + return getGraphEdge(); + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + return getGraphElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__POSITION: + setPosition((Point) newValue); + return; + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + getGraphEdge().clear(); + getGraphEdge().addAll((Collection) newValue); + return; + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + setGraphElement((GraphElement) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__POSITION: + setPosition(POSITION_EDEFAULT); + return; + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + getGraphEdge().clear(); + return; + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + setGraphElement((GraphElement) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_CONNECTOR__POSITION: + return POSITION_EDEFAULT == null ? position != null : !POSITION_EDEFAULT.equals(position); + case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: + return graphEdge != null && !graphEdge.isEmpty(); + case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: + return getGraphElement() != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (position: "); + result.append(position); + result.append(')'); + return result.toString(); + } + +} // GraphConnectorImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java new file mode 100644 index 00000000000..94ab66b63da --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java @@ -0,0 +1,278 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.GraphConnector; +import org.eclipse.papyrus.conversion.di2.GraphEdge; +import org.eclipse.papyrus.conversion.di2.GraphElement; + +/** + * An implementation of the model object 'Graph Edge'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl#getAnchor Anchor}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl#getWaypoints Waypoints + * }
    • + *
    + *

    + * + * @generated + */ +public class GraphEdgeImpl extends GraphElementImpl implements GraphEdge { + + /** + * The cached value of the '{@link #getAnchor() Anchor}' reference list. + * + * @see #getAnchor() + * @generated + * @ordered + */ + protected EList anchor; + + /** + * The cached value of the '{@link #getWaypoints() Waypoints}' attribute list. + * + * @see #getWaypoints() + * @generated + * @ordered + */ + protected EList waypoints; + + /** + * + * + * @generated + */ + protected GraphEdgeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.GRAPH_EDGE; + } + + /** + * + * + * @generated + */ + public EList getAnchor() { + if (anchor == null) { + anchor = new EObjectWithInverseResolvingEList.ManyInverse(GraphConnector.class, this, + Di2Package.GRAPH_EDGE__ANCHOR, Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE); + } + return anchor; + } + + /** + * + * + * @generated + */ + public EList getWaypoints() { + if (waypoints == null) { + waypoints = new EDataTypeUniqueEList(Point.class, this, Di2Package.GRAPH_EDGE__WAYPOINTS); + } + return waypoints; + } + + /** + * + * + * @generated + */ + public GraphElement getAnchorSource() { + return ((GraphConnector) getAnchor().get(0)).getGraphElement(); + } + + /** + * + * + * @generated + */ + public GraphElement getAnchorTarget() { + return ((GraphConnector) getAnchor().get(1)).getGraphElement(); + } + + /** + * + * + * @generated + */ + public void setAnchorSource(GraphElement value) { + initConnectors(); + ((GraphConnector) getAnchor().get(0)).setGraphElement(value); + } + + /** + * + * + * @generated + */ + public void setAnchorTarget(GraphElement value) { + initConnectors(); + ((GraphConnector) getAnchor().get(1)).setGraphElement(value); + } + + /** + * + * + * @generated + */ + public void initConnectors() { + if (!getAnchor().isEmpty()) + return; + + getAnchor().add(Di2Package.eINSTANCE.getDi2Factory().createGraphConnector()); + getAnchor().add(Di2Package.eINSTANCE.getDi2Factory().createGraphConnector()); + + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + return ((InternalEList) (InternalEList) getAnchor()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + return ((InternalEList) getAnchor()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + return getAnchor(); + case Di2Package.GRAPH_EDGE__WAYPOINTS: + return getWaypoints(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + getAnchor().clear(); + getAnchor().addAll((Collection) newValue); + return; + case Di2Package.GRAPH_EDGE__WAYPOINTS: + getWaypoints().clear(); + getWaypoints().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + getAnchor().clear(); + return; + case Di2Package.GRAPH_EDGE__WAYPOINTS: + getWaypoints().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_EDGE__ANCHOR: + return anchor != null && !anchor.isEmpty(); + case Di2Package.GRAPH_EDGE__WAYPOINTS: + return waypoints != null && !waypoints.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (waypoints: "); + result.append(waypoints); + result.append(')'); + return result.toString(); + } + +} // GraphEdgeImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java new file mode 100644 index 00000000000..3cbe314b11f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java @@ -0,0 +1,401 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.DiagramElement; +import org.eclipse.papyrus.conversion.di2.DiagramLink; +import org.eclipse.papyrus.conversion.di2.GraphConnector; +import org.eclipse.papyrus.conversion.di2.GraphElement; +import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; + +/** + * An implementation of the model object 'Graph Element'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getContained + * Contained}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getLink Link}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getSemanticModel + * Semantic Model}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getPosition Position + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getAnchorage + * Anchorage}
    • + *
    + *

    + * + * @generated + */ +public class GraphElementImpl extends DiagramElementImpl implements GraphElement { + + /** + * The cached value of the '{@link #getContained() Contained}' containment reference + * list. + * + * @see #getContained() + * @generated + * @ordered + */ + protected EList contained; + + /** + * The cached value of the '{@link #getLink() Link}' containment reference list. + * + * @see #getLink() + * @generated + * @ordered + */ + protected EList link; + + /** + * The cached value of the '{@link #getSemanticModel() Semantic Model}' containment + * reference. + * + * @see #getSemanticModel() + * @generated + * @ordered + */ + protected SemanticModelBridge semanticModel; + + /** + * The default value of the '{@link #getPosition() Position}' attribute. + * + * @see #getPosition() + * @generated + * @ordered + */ + protected static final Point POSITION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPosition() Position}' attribute. + * + * @see #getPosition() + * @generated + * @ordered + */ + protected Point position = POSITION_EDEFAULT; + + /** + * The cached value of the '{@link #getAnchorage() Anchorage}' containment reference + * list. + * + * @see #getAnchorage() + * @generated + * @ordered + */ + protected EList anchorage; + + /** + * + * + * @generated + */ + protected GraphElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.GRAPH_ELEMENT; + } + + /** + * + * + * @generated + */ + public EList getContained() { + if (contained == null) { + contained = new EObjectContainmentWithInverseEList(DiagramElement.class, this, + Di2Package.GRAPH_ELEMENT__CONTAINED, Di2Package.DIAGRAM_ELEMENT__CONTAINER); + } + return contained; + } + + /** + * + * + * @generated + */ + public EList getLink() { + if (link == null) { + link = new EObjectContainmentEList(DiagramLink.class, this, Di2Package.GRAPH_ELEMENT__LINK); + } + return link; + } + + /** + * + * + * @generated + */ + public SemanticModelBridge getSemanticModel() { + return semanticModel; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSemanticModel(SemanticModelBridge newSemanticModel, NotificationChain msgs) { + SemanticModelBridge oldSemanticModel = semanticModel; + semanticModel = newSemanticModel; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, oldSemanticModel, newSemanticModel); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSemanticModel(SemanticModelBridge newSemanticModel) { + if (newSemanticModel != semanticModel) { + NotificationChain msgs = null; + if (semanticModel != null) + msgs = ((InternalEObject) semanticModel).eInverseRemove(this, EOPPOSITE_FEATURE_BASE + - Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, null, msgs); + if (newSemanticModel != null) + msgs = ((InternalEObject) newSemanticModel).eInverseAdd(this, EOPPOSITE_FEATURE_BASE + - Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, null, msgs); + msgs = basicSetSemanticModel(newSemanticModel, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, + newSemanticModel, newSemanticModel)); + } + + /** + * + * + * @generated + */ + public Point getPosition() { + return position; + } + + /** + * + * + * @generated + */ + public void setPosition(Point newPosition) { + Point oldPosition = position; + position = newPosition; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_ELEMENT__POSITION, oldPosition, + position)); + } + + /** + * + * + * @generated + */ + public EList getAnchorage() { + if (anchorage == null) { + anchorage = new EObjectContainmentWithInverseEList(GraphConnector.class, this, + Di2Package.GRAPH_ELEMENT__ANCHORAGE, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT); + } + return anchorage; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + return ((InternalEList) (InternalEList) getContained()).basicAdd(otherEnd, msgs); + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + return ((InternalEList) (InternalEList) getAnchorage()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + return ((InternalEList) getContained()).basicRemove(otherEnd, msgs); + case Di2Package.GRAPH_ELEMENT__LINK: + return ((InternalEList) getLink()).basicRemove(otherEnd, msgs); + case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: + return basicSetSemanticModel(null, msgs); + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + return ((InternalEList) getAnchorage()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + return getContained(); + case Di2Package.GRAPH_ELEMENT__LINK: + return getLink(); + case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: + return getSemanticModel(); + case Di2Package.GRAPH_ELEMENT__POSITION: + return getPosition(); + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + return getAnchorage(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + getContained().clear(); + getContained().addAll((Collection) newValue); + return; + case Di2Package.GRAPH_ELEMENT__LINK: + getLink().clear(); + getLink().addAll((Collection) newValue); + return; + case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: + setSemanticModel((SemanticModelBridge) newValue); + return; + case Di2Package.GRAPH_ELEMENT__POSITION: + setPosition((Point) newValue); + return; + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + getAnchorage().clear(); + getAnchorage().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + getContained().clear(); + return; + case Di2Package.GRAPH_ELEMENT__LINK: + getLink().clear(); + return; + case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: + setSemanticModel((SemanticModelBridge) null); + return; + case Di2Package.GRAPH_ELEMENT__POSITION: + setPosition(POSITION_EDEFAULT); + return; + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + getAnchorage().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_ELEMENT__CONTAINED: + return contained != null && !contained.isEmpty(); + case Di2Package.GRAPH_ELEMENT__LINK: + return link != null && !link.isEmpty(); + case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: + return semanticModel != null; + case Di2Package.GRAPH_ELEMENT__POSITION: + return POSITION_EDEFAULT == null ? position != null : !POSITION_EDEFAULT.equals(position); + case Di2Package.GRAPH_ELEMENT__ANCHORAGE: + return anchorage != null && !anchorage.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (position: "); + result.append(position); + result.append(')'); + return result.toString(); + } + +} // GraphElementImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java new file mode 100644 index 00000000000..93d11a18ecf --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java @@ -0,0 +1,169 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.draw2d.geometry.Dimension; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.GraphNode; + +/** + * An implementation of the model object 'Graph Node'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl#getSize Size}
    • + *
    + *

    + * + * @generated + */ +public class GraphNodeImpl extends GraphElementImpl implements GraphNode { + + /** + * The default value of the '{@link #getSize() Size}' attribute. + * + * @see #getSize() + * @generated + * @ordered + */ + protected static final Dimension SIZE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSize() Size}' attribute. + * + * + * @see #getSize() + * @generated + * @ordered + */ + protected Dimension size = SIZE_EDEFAULT; + + /** + * + * + * @generated + */ + protected GraphNodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.GRAPH_NODE; + } + + /** + * + * + * @generated + */ + public Dimension getSize() { + return size; + } + + /** + * + * + * @generated + */ + public void setSize(Dimension newSize) { + Dimension oldSize = size; + size = newSize; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_NODE__SIZE, oldSize, size)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.GRAPH_NODE__SIZE: + return getSize(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.GRAPH_NODE__SIZE: + setSize((Dimension) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_NODE__SIZE: + setSize(SIZE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.GRAPH_NODE__SIZE: + return SIZE_EDEFAULT == null ? size != null : !SIZE_EDEFAULT.equals(size); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (size: "); + result.append(size); + result.append(')'); + return result.toString(); + } + +} // GraphNodeImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java new file mode 100644 index 00000000000..3f6c49353ab --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java @@ -0,0 +1,43 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.GraphicPrimitive; + +/** + * An implementation of the model object 'Graphic Primitive + * '. + *

    + *

    + * + * @generated + */ +public class GraphicPrimitiveImpl extends LeafElementImpl implements GraphicPrimitive { + + /** + * + * + * @generated + */ + protected GraphicPrimitiveImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.GRAPHIC_PRIMITIVE; + } + +} // GraphicPrimitiveImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java new file mode 100644 index 00000000000..7b2af5b32ae --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java @@ -0,0 +1,222 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Image; + +/** + * An implementation of the model object 'Image'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl#getUri Uri}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl#getMimeType Mime Type} + *
    • + *
    + *

    + * + * @generated + */ +public class ImageImpl extends LeafElementImpl implements Image { + + /** + * The default value of the '{@link #getUri() Uri}' attribute. + * + * + * @see #getUri() + * @generated + * @ordered + */ + protected static final String URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUri() Uri}' attribute. + * + * + * @see #getUri() + * @generated + * @ordered + */ + protected String uri = URI_EDEFAULT; + + /** + * The default value of the '{@link #getMimeType() Mime Type}' attribute. + * + * @see #getMimeType() + * @generated + * @ordered + */ + protected static final String MIME_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMimeType() Mime Type}' attribute. + * + * @see #getMimeType() + * @generated + * @ordered + */ + protected String mimeType = MIME_TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ImageImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.IMAGE; + } + + /** + * + * + * @generated + */ + public String getUri() { + return uri; + } + + /** + * + * + * @generated + */ + public void setUri(String newUri) { + String oldUri = uri; + uri = newUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.IMAGE__URI, oldUri, uri)); + } + + /** + * + * + * @generated + */ + public String getMimeType() { + return mimeType; + } + + /** + * + * + * @generated + */ + public void setMimeType(String newMimeType) { + String oldMimeType = mimeType; + mimeType = newMimeType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.IMAGE__MIME_TYPE, oldMimeType, mimeType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.IMAGE__URI: + return getUri(); + case Di2Package.IMAGE__MIME_TYPE: + return getMimeType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.IMAGE__URI: + setUri((String) newValue); + return; + case Di2Package.IMAGE__MIME_TYPE: + setMimeType((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.IMAGE__URI: + setUri(URI_EDEFAULT); + return; + case Di2Package.IMAGE__MIME_TYPE: + setMimeType(MIME_TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.IMAGE__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + case Di2Package.IMAGE__MIME_TYPE: + return MIME_TYPE_EDEFAULT == null ? mimeType != null : !MIME_TYPE_EDEFAULT.equals(mimeType); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (uri: "); + result.append(uri); + result.append(", mimeType: "); + result.append(mimeType); + result.append(')'); + return result.toString(); + } + +} // ImageImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java new file mode 100644 index 00000000000..be2328258cc --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java @@ -0,0 +1,43 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.LeafElement; + +/** + * An implementation of the model object 'Leaf Element'. + * + *

    + *

    + * + * @generated + */ +public class LeafElementImpl extends DiagramElementImpl implements LeafElement { + + /** + * + * + * @generated + */ + protected LeafElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.LEAF_ELEMENT; + } + +} // LeafElementImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java new file mode 100644 index 00000000000..dc6b3e64f2a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java @@ -0,0 +1,191 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import java.util.Collection; + +import org.eclipse.draw2d.geometry.Point; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Polilyne; + +/** + * An implementation of the model object 'Polilyne'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl#getWaypoints Waypoints + * }
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl#getClosed Closed}
    • + *
    + *

    + * + * @generated + */ +public class PolilyneImpl extends GraphicPrimitiveImpl implements Polilyne { + + /** + * The cached value of the '{@link #getWaypoints() Waypoints}' attribute list. + * + * @see #getWaypoints() + * @generated + * @ordered + */ + protected EList waypoints; + + /** + * The cached value of the '{@link #getClosed() Closed}' attribute list. + * + * @see #getClosed() + * @generated + * @ordered + */ + protected EList closed; + + /** + * + * + * @generated + */ + protected PolilyneImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.POLILYNE; + } + + /** + * + * + * @generated + */ + public EList getWaypoints() { + if (waypoints == null) { + waypoints = new EDataTypeUniqueEList(Point.class, this, Di2Package.POLILYNE__WAYPOINTS); + } + return waypoints; + } + + /** + * + * + * @generated + */ + public EList getClosed() { + if (closed == null) { + closed = new EDataTypeUniqueEList(Boolean.class, this, Di2Package.POLILYNE__CLOSED); + } + return closed; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.POLILYNE__WAYPOINTS: + return getWaypoints(); + case Di2Package.POLILYNE__CLOSED: + return getClosed(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.POLILYNE__WAYPOINTS: + getWaypoints().clear(); + getWaypoints().addAll((Collection) newValue); + return; + case Di2Package.POLILYNE__CLOSED: + getClosed().clear(); + getClosed().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.POLILYNE__WAYPOINTS: + getWaypoints().clear(); + return; + case Di2Package.POLILYNE__CLOSED: + getClosed().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.POLILYNE__WAYPOINTS: + return waypoints != null && !waypoints.isEmpty(); + case Di2Package.POLILYNE__CLOSED: + return closed != null && !closed.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (waypoints: "); + result.append(waypoints); + result.append(", closed: "); + result.append(closed); + result.append(')'); + return result.toString(); + } + +} // PolilyneImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java new file mode 100644 index 00000000000..67a576ad15c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java @@ -0,0 +1,222 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Property; + +/** + * An implementation of the model object 'Property'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl#getKey Key}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl#getValue Value}
    • + *
    + *

    + * + * @generated + */ +public class PropertyImpl extends EObjectImpl implements Property { + + /** + * The default value of the '{@link #getKey() Key}' attribute. + * + * + * @see #getKey() + * @generated + * @ordered + */ + protected static final String KEY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getKey() Key}' attribute. + * + * + * @see #getKey() + * @generated + * @ordered + */ + protected String key = KEY_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected PropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.PROPERTY; + } + + /** + * + * + * @generated + */ + public String getKey() { + return key; + } + + /** + * + * + * @generated + */ + public void setKey(String newKey) { + String oldKey = key; + key = newKey; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.PROPERTY__KEY, oldKey, key)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.PROPERTY__KEY: + return getKey(); + case Di2Package.PROPERTY__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.PROPERTY__KEY: + setKey((String) newValue); + return; + case Di2Package.PROPERTY__VALUE: + setValue((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.PROPERTY__KEY: + setKey(KEY_EDEFAULT); + return; + case Di2Package.PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.PROPERTY__KEY: + return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key); + case Di2Package.PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (key: "); + result.append(key); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} // PropertyImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java new file mode 100644 index 00000000000..226ceecd230 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java @@ -0,0 +1,238 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.DiagramElement; +import org.eclipse.papyrus.conversion.di2.Reference; + +/** + * An implementation of the model object 'Reference'. + *

    + * The following features are implemented: + *

      + *
    • + * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl#isIsIndividualRepresentation + * Is Individual Representation}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl#getReferenced + * Referenced}
    • + *
    + *

    + * + * @generated + */ +public class ReferenceImpl extends DiagramElementImpl implements Reference { + + /** + * The default value of the '{@link #isIsIndividualRepresentation() + * Is Individual Representation}' attribute. + * + * @see #isIsIndividualRepresentation() + * @generated + * @ordered + */ + protected static final boolean IS_INDIVIDUAL_REPRESENTATION_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsIndividualRepresentation() + * Is Individual Representation}' attribute. + * + * @see #isIsIndividualRepresentation() + * @generated + * @ordered + */ + protected boolean isIndividualRepresentation = IS_INDIVIDUAL_REPRESENTATION_EDEFAULT; + + /** + * The cached value of the '{@link #getReferenced() Referenced}' reference. + * + * @see #getReferenced() + * @generated + * @ordered + */ + protected DiagramElement referenced; + + /** + * + * + * @generated + */ + protected ReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.REFERENCE; + } + + /** + * + * + * @generated + */ + public boolean isIsIndividualRepresentation() { + return isIndividualRepresentation; + } + + /** + * + * + * @generated + */ + public void setIsIndividualRepresentation(boolean newIsIndividualRepresentation) { + boolean oldIsIndividualRepresentation = isIndividualRepresentation; + isIndividualRepresentation = newIsIndividualRepresentation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION, + oldIsIndividualRepresentation, isIndividualRepresentation)); + } + + /** + * + * + * @generated + */ + public DiagramElement getReferenced() { + if (referenced != null && referenced.eIsProxy()) { + InternalEObject oldReferenced = (InternalEObject) referenced; + referenced = (DiagramElement) eResolveProxy(oldReferenced); + if (referenced != oldReferenced) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.REFERENCE__REFERENCED, + oldReferenced, referenced)); + } + } + return referenced; + } + + /** + * + * + * @generated + */ + public DiagramElement basicGetReferenced() { + return referenced; + } + + /** + * + * + * @generated + */ + public void setReferenced(DiagramElement newReferenced) { + DiagramElement oldReferenced = referenced; + referenced = newReferenced; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.REFERENCE__REFERENCED, oldReferenced, + referenced)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: + return isIsIndividualRepresentation() ? Boolean.TRUE : Boolean.FALSE; + case Di2Package.REFERENCE__REFERENCED: + if (resolve) + return getReferenced(); + return basicGetReferenced(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: + setIsIndividualRepresentation(((Boolean) newValue).booleanValue()); + return; + case Di2Package.REFERENCE__REFERENCED: + setReferenced((DiagramElement) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: + setIsIndividualRepresentation(IS_INDIVIDUAL_REPRESENTATION_EDEFAULT); + return; + case Di2Package.REFERENCE__REFERENCED: + setReferenced((DiagramElement) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: + return isIndividualRepresentation != IS_INDIVIDUAL_REPRESENTATION_EDEFAULT; + case Di2Package.REFERENCE__REFERENCED: + return referenced != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (isIndividualRepresentation: "); + result.append(isIndividualRepresentation); + result.append(')'); + return result.toString(); + } + +} // ReferenceImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java new file mode 100644 index 00000000000..ca74d4c0bd7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java @@ -0,0 +1,236 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.GraphElement; +import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; + +/** + * An implementation of the model object ' + * Semantic Model Bridge'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl#getPresentation + * Presentation}
    • + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl#getGraphElement + * Graph Element}
    • + *
    + *

    + * + * @generated + */ +public class SemanticModelBridgeImpl extends EObjectImpl implements SemanticModelBridge { + + /** + * The default value of the '{@link #getPresentation() Presentation}' attribute. + * + * @see #getPresentation() + * @generated + * @ordered + */ + protected static final String PRESENTATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPresentation() Presentation}' attribute. + * + * @see #getPresentation() + * @generated + * @ordered + */ + protected String presentation = PRESENTATION_EDEFAULT; + + /** + * The cached value of the '{@link #getGraphElement() Graph Element}' reference. + * + * @see #getGraphElement() + * @generated + * @ordered + */ + protected GraphElement graphElement; + + /** + * + * + * @generated + */ + protected SemanticModelBridgeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.SEMANTIC_MODEL_BRIDGE; + } + + /** + * + * + * @generated + */ + public String getPresentation() { + return presentation; + } + + /** + * + * + * @generated + */ + public void setPresentation(String newPresentation) { + String oldPresentation = presentation; + presentation = newPresentation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION, + oldPresentation, presentation)); + } + + /** + * + * + * @generated + */ + public GraphElement getGraphElement() { + if (graphElement != null && graphElement.eIsProxy()) { + InternalEObject oldGraphElement = (InternalEObject) graphElement; + graphElement = (GraphElement) eResolveProxy(oldGraphElement); + if (graphElement != oldGraphElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT, oldGraphElement, graphElement)); + } + } + return graphElement; + } + + /** + * + * + * @generated + */ + public GraphElement basicGetGraphElement() { + return graphElement; + } + + /** + * + * + * @generated + */ + public void setGraphElement(GraphElement newGraphElement) { + GraphElement oldGraphElement = graphElement; + graphElement = newGraphElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT, + oldGraphElement, graphElement)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: + return getPresentation(); + case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: + if (resolve) + return getGraphElement(); + return basicGetGraphElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: + setPresentation((String) newValue); + return; + case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: + setGraphElement((GraphElement) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: + setPresentation(PRESENTATION_EDEFAULT); + return; + case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: + setGraphElement((GraphElement) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: + return PRESENTATION_EDEFAULT == null ? presentation != null : !PRESENTATION_EDEFAULT.equals(presentation); + case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: + return graphElement != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (presentation: "); + result.append(presentation); + result.append(')'); + return result.toString(); + } + +} // SemanticModelBridgeImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java new file mode 100644 index 00000000000..82b4ddbe206 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java @@ -0,0 +1,170 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement; + +/** + * An implementation of the model object ' + * Simple Semantic Model Element'. + *

    + * The following features are implemented: + *

      + *
    • + * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl#getTypeinfo + * Typeinfo}
    • + *
    + *

    + * + * @generated + */ +public class SimpleSemanticModelElementImpl extends SemanticModelBridgeImpl implements SimpleSemanticModelElement { + + /** + * The default value of the '{@link #getTypeinfo() Typeinfo}' attribute. + * + * @see #getTypeinfo() + * @generated + * @ordered + */ + protected static final String TYPEINFO_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTypeinfo() Typeinfo}' attribute. + * + * @see #getTypeinfo() + * @generated + * @ordered + */ + protected String typeinfo = TYPEINFO_EDEFAULT; + + /** + * + * + * @generated + */ + protected SimpleSemanticModelElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.SIMPLE_SEMANTIC_MODEL_ELEMENT; + } + + /** + * + * + * @generated + */ + public String getTypeinfo() { + return typeinfo; + } + + /** + * + * + * @generated + */ + public void setTypeinfo(String newTypeinfo) { + String oldTypeinfo = typeinfo; + typeinfo = newTypeinfo; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO, + oldTypeinfo, typeinfo)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: + return getTypeinfo(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: + setTypeinfo((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: + setTypeinfo(TYPEINFO_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: + return TYPEINFO_EDEFAULT == null ? typeinfo != null : !TYPEINFO_EDEFAULT.equals(typeinfo); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (typeinfo: "); + result.append(typeinfo); + result.append(')'); + return result.toString(); + } + +} // SimpleSemanticModelElementImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java new file mode 100644 index 00000000000..e4f1e5e3b77 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java @@ -0,0 +1,167 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.TextElement; + +/** + * An implementation of the model object 'Text Element'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl#getText Text}
    • + *
    + *

    + * + * @generated + */ +public class TextElementImpl extends LeafElementImpl implements TextElement { + + /** + * The default value of the '{@link #getText() Text}' attribute. + * + * @see #getText() + * @generated + * @ordered + */ + protected static final String TEXT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getText() Text}' attribute. + * + * + * @see #getText() + * @generated + * @ordered + */ + protected String text = TEXT_EDEFAULT; + + /** + * + * + * @generated + */ + protected TextElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.TEXT_ELEMENT; + } + + /** + * + * + * @generated + */ + public String getText() { + return text; + } + + /** + * + * + * @generated + */ + public void setText(String newText) { + String oldText = text; + text = newText; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.TEXT_ELEMENT__TEXT, oldText, text)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.TEXT_ELEMENT__TEXT: + return getText(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.TEXT_ELEMENT__TEXT: + setText((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.TEXT_ELEMENT__TEXT: + setText(TEXT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.TEXT_ELEMENT__TEXT: + return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (text: "); + result.append(text); + result.append(')'); + return result.toString(); + } + +} // TextElementImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java new file mode 100644 index 00000000000..3d621c99157 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java @@ -0,0 +1,165 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.impl; + + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.conversion.di2.Di2Package; +import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; +import org.eclipse.uml2.uml.Element; + +/** + * An implementation of the model object ' + * Uml1 Semantic Model Bridge'. + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl#getElement + * Element}
    • + *
    + *

    + * + * @generated + */ +public class Uml1SemanticModelBridgeImpl extends SemanticModelBridgeImpl implements Uml1SemanticModelBridge { + + /** + * The cached value of the '{@link #getElement() Element}' reference. + * + * @see #getElement() + * @generated + * @ordered + */ + protected Element element; + + /** + * + * + * @generated + */ + protected Uml1SemanticModelBridgeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return Di2Package.Literals.UML1_SEMANTIC_MODEL_BRIDGE; + } + + /** + * + * + * @generated + */ + public Element getElement() { + if (element != null && element.eIsProxy()) { + InternalEObject oldElement = (InternalEObject) element; + element = (Element) eResolveProxy(oldElement); + if (element != oldElement) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT, oldElement, element)); + } + } + return element; + } + + /** + * + * + * @generated + */ + public Element basicGetElement() { + return element; + } + + /** + * + * + * @generated + */ + public void setElement(Element newElement) { + Element oldElement = element; + element = newElement; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT, + oldElement, element)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: + if (resolve) + return getElement(); + return basicGetElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: + setElement((Element) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: + setElement((Element) null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: + return element != null; + } + return super.eIsSet(featureID); + } + +} // Uml1SemanticModelBridgeImpl diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java new file mode 100644 index 00000000000..a93a23f7947 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java @@ -0,0 +1,481 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.util; + + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.conversion.di2.*; + +/** + * The Adapter Factory for the model. It provides an adapter + * createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package + * @generated + */ +public class Di2AdapterFactory extends AdapterFactoryImpl { + + /** + * The cached model package. + * + * @generated + */ + protected static Di2Package modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * @generated + */ + public Di2AdapterFactory() { + if (modelPackage == null) { + modelPackage = Di2Package.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. This implementation returns true if the object is either the model's package + * or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch the delegates to the createXXX methods. + * + * @generated + */ + protected Di2Switch modelSwitch = new Di2Switch() { + + @Override + public Adapter caseDiagramElement(DiagramElement object) { + return createDiagramElementAdapter(); + } + + @Override + public Adapter caseGraphElement(GraphElement object) { + return createGraphElementAdapter(); + } + + @Override + public Adapter caseReference(Reference object) { + return createReferenceAdapter(); + } + + @Override + public Adapter caseProperty(Property object) { + return createPropertyAdapter(); + } + + @Override + public Adapter caseGraphEdge(GraphEdge object) { + return createGraphEdgeAdapter(); + } + + @Override + public Adapter caseGraphConnector(GraphConnector object) { + return createGraphConnectorAdapter(); + } + + @Override + public Adapter caseGraphNode(GraphNode object) { + return createGraphNodeAdapter(); + } + + @Override + public Adapter caseDiagramLink(DiagramLink object) { + return createDiagramLinkAdapter(); + } + + @Override + public Adapter caseDiagram(Diagram object) { + return createDiagramAdapter(); + } + + @Override + public Adapter caseSemanticModelBridge(SemanticModelBridge object) { + return createSemanticModelBridgeAdapter(); + } + + @Override + public Adapter caseSimpleSemanticModelElement(SimpleSemanticModelElement object) { + return createSimpleSemanticModelElementAdapter(); + } + + @Override + public Adapter caseUml1SemanticModelBridge(Uml1SemanticModelBridge object) { + return createUml1SemanticModelBridgeAdapter(); + } + + @Override + public Adapter caseCoreSemanticModelBridge(CoreSemanticModelBridge object) { + return createCoreSemanticModelBridgeAdapter(); + } + + @Override + public Adapter caseLeafElement(LeafElement object) { + return createLeafElementAdapter(); + } + + @Override + public Adapter caseTextElement(TextElement object) { + return createTextElementAdapter(); + } + + @Override + public Adapter caseImage(Image object) { + return createImageAdapter(); + } + + @Override + public Adapter caseGraphicPrimitive(GraphicPrimitive object) { + return createGraphicPrimitiveAdapter(); + } + + @Override + public Adapter casePolilyne(Polilyne object) { + return createPolilyneAdapter(); + } + + @Override + public Adapter caseEllipse(Ellipse object) { + return createEllipseAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * @param target + * the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramElement Diagram Element}'. + * This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.DiagramElement + * @generated + */ + public Adapter createDiagramElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphElement Graph Element}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.GraphElement + * @generated + */ + public Adapter createGraphElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Reference Reference}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Reference + * @generated + */ + public Adapter createReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Property Property}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Property + * @generated + */ + public Adapter createPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphEdge Graph Edge}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.GraphEdge + * @generated + */ + public Adapter createGraphEdgeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphConnector Graph Connector}'. + * This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.GraphConnector + * @generated + */ + public Adapter createGraphConnectorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphNode Graph Node}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.GraphNode + * @generated + */ + public Adapter createGraphNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.DiagramLink Diagram Link}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.DiagramLink + * @generated + */ + public Adapter createDiagramLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Diagram Diagram}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Diagram + * @generated + */ + public Adapter createDiagramAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge + * Semantic Model Bridge}'. This default implementation returns + * null so that we can easily ignore cases; it's useful to ignore a case when inheritance will + * catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge + * @generated + */ + public Adapter createSemanticModelBridgeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement + * Simple Semantic Model Element}'. This default implementation + * returns null so that we can easily ignore cases; it's useful to ignore a case when + * inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement + * @generated + */ + public Adapter createSimpleSemanticModelElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge + * Uml1 Semantic Model Bridge}'. This default implementation + * returns null so that we can easily ignore cases; it's useful to ignore a case when + * inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge + * @generated + */ + public Adapter createUml1SemanticModelBridgeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge + * Core Semantic Model Bridge}'. This default implementation + * returns null so that we can easily ignore cases; it's useful to ignore a case when + * inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge + * @generated + */ + public Adapter createCoreSemanticModelBridgeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.LeafElement Leaf Element}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.LeafElement + * @generated + */ + public Adapter createLeafElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.TextElement Text Element}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.TextElement + * @generated + */ + public Adapter createTextElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Image Image}'. This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Image + * @generated + */ + public Adapter createImageAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.GraphicPrimitive Graphic Primitive}'. + * This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.GraphicPrimitive + * @generated + */ + public Adapter createGraphicPrimitiveAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Polilyne Polilyne}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Polilyne + * @generated + */ + public Adapter createPolilyneAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.papyrus.conversion.di2.Ellipse Ellipse}'. This default implementation returns null so that we can easily ignore + * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.conversion.di2.Ellipse + * @generated + */ + public Adapter createEllipseAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. This default + * implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // Di2AdapterFactory diff --git a/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java new file mode 100644 index 00000000000..2f674ca01f2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java @@ -0,0 +1,574 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.conversion.di2.util; + + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.conversion.di2.*; + +/** + * The Switch for the model's inheritance hierarchy. It supports the + * call {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for + * each class of the model, starting with the actual class of the object and proceeding up the + * inheritance hierarchy until a non-null result is returned, which is the result of the switch. + * + * + * @see org.eclipse.papyrus.conversion.di2.Di2Package + * @generated + */ +public class Di2Switch { + + /** + * The cached model package + * + * @generated + */ + protected static Di2Package modelPackage; + + /** + * Creates an instance of the switch. + * + * @generated + */ + public Di2Switch() { + if (modelPackage == null) { + modelPackage = Di2Package.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; + * it yields that result. + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public T doSwitch(EObject theEObject) { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; + * it yields that result. + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) { + if (theEClass.eContainer() == modelPackage) { + return doSwitch(theEClass.getClassifierID(), theEObject); + } else { + List eSuperTypes = theEClass.getESuperTypes(); + return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; + * it yields that result. + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case Di2Package.DIAGRAM_ELEMENT: { + DiagramElement diagramElement = (DiagramElement) theEObject; + T result = caseDiagramElement(diagramElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.GRAPH_ELEMENT: { + GraphElement graphElement = (GraphElement) theEObject; + T result = caseGraphElement(graphElement); + if (result == null) + result = caseDiagramElement(graphElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.REFERENCE: { + Reference reference = (Reference) theEObject; + T result = caseReference(reference); + if (result == null) + result = caseDiagramElement(reference); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.PROPERTY: { + Property property = (Property) theEObject; + T result = caseProperty(property); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.GRAPH_EDGE: { + GraphEdge graphEdge = (GraphEdge) theEObject; + T result = caseGraphEdge(graphEdge); + if (result == null) + result = caseGraphElement(graphEdge); + if (result == null) + result = caseDiagramElement(graphEdge); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.GRAPH_CONNECTOR: { + GraphConnector graphConnector = (GraphConnector) theEObject; + T result = caseGraphConnector(graphConnector); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.GRAPH_NODE: { + GraphNode graphNode = (GraphNode) theEObject; + T result = caseGraphNode(graphNode); + if (result == null) + result = caseGraphElement(graphNode); + if (result == null) + result = caseDiagramElement(graphNode); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.DIAGRAM_LINK: { + DiagramLink diagramLink = (DiagramLink) theEObject; + T result = caseDiagramLink(diagramLink); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.DIAGRAM: { + Diagram diagram = (Diagram) theEObject; + T result = caseDiagram(diagram); + if (result == null) + result = caseGraphNode(diagram); + if (result == null) + result = caseGraphElement(diagram); + if (result == null) + result = caseDiagramElement(diagram); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.SEMANTIC_MODEL_BRIDGE: { + SemanticModelBridge semanticModelBridge = (SemanticModelBridge) theEObject; + T result = caseSemanticModelBridge(semanticModelBridge); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT: { + SimpleSemanticModelElement simpleSemanticModelElement = (SimpleSemanticModelElement) theEObject; + T result = caseSimpleSemanticModelElement(simpleSemanticModelElement); + if (result == null) + result = caseSemanticModelBridge(simpleSemanticModelElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE: { + Uml1SemanticModelBridge uml1SemanticModelBridge = (Uml1SemanticModelBridge) theEObject; + T result = caseUml1SemanticModelBridge(uml1SemanticModelBridge); + if (result == null) + result = caseSemanticModelBridge(uml1SemanticModelBridge); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.CORE_SEMANTIC_MODEL_BRIDGE: { + CoreSemanticModelBridge coreSemanticModelBridge = (CoreSemanticModelBridge) theEObject; + T result = caseCoreSemanticModelBridge(coreSemanticModelBridge); + if (result == null) + result = caseSemanticModelBridge(coreSemanticModelBridge); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.LEAF_ELEMENT: { + LeafElement leafElement = (LeafElement) theEObject; + T result = caseLeafElement(leafElement); + if (result == null) + result = caseDiagramElement(leafElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.TEXT_ELEMENT: { + TextElement textElement = (TextElement) theEObject; + T result = caseTextElement(textElement); + if (result == null) + result = caseLeafElement(textElement); + if (result == null) + result = caseDiagramElement(textElement); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.IMAGE: { + Image image = (Image) theEObject; + T result = caseImage(image); + if (result == null) + result = caseLeafElement(image); + if (result == null) + result = caseDiagramElement(image); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.GRAPHIC_PRIMITIVE: { + GraphicPrimitive graphicPrimitive = (GraphicPrimitive) theEObject; + T result = caseGraphicPrimitive(graphicPrimitive); + if (result == null) + result = caseLeafElement(graphicPrimitive); + if (result == null) + result = caseDiagramElement(graphicPrimitive); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.POLILYNE: { + Polilyne polilyne = (Polilyne) theEObject; + T result = casePolilyne(polilyne); + if (result == null) + result = caseGraphicPrimitive(polilyne); + if (result == null) + result = caseLeafElement(polilyne); + if (result == null) + result = caseDiagramElement(polilyne); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Di2Package.ELLIPSE: { + Ellipse ellipse = (Ellipse) theEObject; + T result = caseEllipse(ellipse); + if (result == null) + result = caseGraphicPrimitive(ellipse); + if (result == null) + result = caseLeafElement(ellipse); + if (result == null) + result = caseDiagramElement(ellipse); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Diagram Element'. + * This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Diagram Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDiagramElement(DiagramElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Graph Element'. + * This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Graph Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGraphElement(GraphElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Reference'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReference(Reference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Property'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProperty(Property object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Graph Edge'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Graph Edge'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGraphEdge(GraphEdge object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Graph Connector'. + * This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Graph Connector'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGraphConnector(GraphConnector object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Graph Node'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Graph Node'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGraphNode(GraphNode object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Diagram Link'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Diagram Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDiagramLink(DiagramLink object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Diagram'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Diagram'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDiagram(Diagram object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * Semantic Model Bridge'. This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * Semantic Model Bridge'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSemanticModelBridge(SemanticModelBridge object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * Simple Semantic Model Element'. This implementation returns + * null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * Simple Semantic Model Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSimpleSemanticModelElement(SimpleSemanticModelElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * Uml1 Semantic Model Bridge'. This implementation returns + * null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * Uml1 Semantic Model Bridge'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUml1SemanticModelBridge(Uml1SemanticModelBridge object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * Core Semantic Model Bridge'. This implementation returns + * null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * Core Semantic Model Bridge'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCoreSemanticModelBridge(CoreSemanticModelBridge object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Leaf Element'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Leaf Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLeafElement(LeafElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Text Element'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Text Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTextElement(TextElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Image'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Image'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImage(Image object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Graphic Primitive'. + * This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Graphic Primitive'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGraphicPrimitive(GraphicPrimitive object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Polilyne'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Polilyne'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePolilyne(Polilyne object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Ellipse'. This implementation returns null; returning a non-null result will + * terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Ellipse'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEllipse(Ellipse object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will + * terminate the switch, but this is the last case anyway. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public T defaultCase(EObject object) { + return null; + } + +} // Di2Switch diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/.classpath b/deprecated/org.eclipse.papyrus.conversion.di2todi/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/.project b/deprecated/org.eclipse.papyrus.conversion.di2todi/.project new file mode 100644 index 00000000000..afabadc6203 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/.project @@ -0,0 +1,34 @@ + + + org.eclipse.papyrus.conversion.di2todi + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..bad2bb38a43 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.conversion.di2todi;singleton:=true +Bundle-Version: 0.8.0.qualifier +Bundle-Activator: org.eclipse.papyrus.conversion.di2todi.Activator +Bundle-Vendor: %pluginProvider +Require-Bundle: org.eclipse.m2m.qvt.oml;bundle-version="3.0.0", + org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.m2m.qvt.oml.runtime;bundle-version="2.1.0", + org.eclipse.uml2.uml;bundle-version="3.1.0", + org.eclipse.gmf.runtime.notation;bundle-version="1.4.0", + org.eclipse.m2m.qvt.oml.emf.util;bundle-version="2.0.100", + org.eclipse.papyrus.conversion.di2, + org.eclipse.papyrus.uml.diagram.clazz;bundle-version="0.10.1" +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ActivationPolicy: lazy +Import-Package: junit.framework, + org.apache.commons.io, + org.eclipse.draw2d.geometry, + org.eclipse.gmf.runtime.diagram.ui.view.factories, + org.eclipse.m2m.internal.qvt.oml.common, + org.eclipse.m2m.internal.qvt.oml.common.io, + org.eclipse.m2m.internal.qvt.oml.project.builder, + org.eclipse.m2m.internal.qvt.oml.project.nature, + org.eclipse.m2m.qvt.oml.debug.core.launch diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto new file mode 100644 index 00000000000..f0837e19292 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto @@ -0,0 +1,39 @@ + +--Author Manel Fredj-CEA LIST + +library VisualIDs; + +--for an association +property VisualId_Edge_Association : String = "4001"; +property VisualId_Edge_Association_DecoNode1 : String = "6001"; +property VisualId_Edge_Association_DecoNode2 : String = "6002"; +property VisualId_Edge_Association_DecoNode3 : String = "6003"; +property VisualId_Edge_Association_DecoNode4 : String = "6005"; +property VisualId_Edge_Association_DecoNode5 : String = "6033"; +property VisualId_Edge_Association_DecoNode6 : String = "6034"; + +--for a generalization within class diagram +property VisualId_Edge_Generalization : String = "4002"; +property VisualId_Edge_Generalization_DecoNode : String = "6007"; + +--for a dependency +property VisualId_Edge_Dependency : String = "4008"; +property VisualId_Edge_Dependency_DecoNode1 : String = "6026"; +property VisualId_Edge_Dependency_DecoNode2 : String = "6027"; + +--for a realization +property VisualId_Edge_Realization : String = "4005"; + +property VisualId_Edge_Realization_DecoNode1 : String = "6012"; +property VisualId_Edge_Realization_DecoNode2 : String = "6013"; + +--for a link (different for profile and class!) +property VisualId_CEdge_Link : String = "4013"; +property VisualId_PEdge_Link : String = "1022"; + +--for a package import +property VisualId_Edge_PackageImport : String = "1065"; +property VisualId_Edge_PackageImport_DecoNode : String = "6022"; + +--for an extension +property VisualId_Edge_Extension : String = "1013"; \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto new file mode 100644 index 00000000000..046a85c23ba --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto @@ -0,0 +1,280 @@ +--Author Manel Fredj-CEA LIST + +library HelpersEdge; +import GeneralMappingsandHelpers; +import NotationQueries; +import ClassAndProfileDiagEdgeVisualIDs; + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + +--class and profile have identical visual IDs for relationships +--Since the profile diagram has been developed starting with a class diagram. This +--is not the case for other diagram types +mapping di2::GraphEdge::classAndProfileDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector +{ + --setting the type and children + if (self.getElement() != null) then { + + if (self.getElement().isGeneralization()) then { + type := VisualId_Edge_Generalization; + --adding children + children := setChildrenForGeneralization(); + } endif; + if (self.getElement().oclIsTypeOf(uml::Extension)) then { + type := VisualId_Edge_Extension; + --adding children + // children := setChildrenForExtension(); + } else { + // extension is also an association, use "else" (else if is unfortunatley not supported in QVTO) + if (self.getElement().isAssociation()) then { + type := VisualId_Edge_Association; + children := setChildrenForAssociation(); + } endif; + } endif; + if (self.getElement().oclIsTypeOf(uml::PackageImport)) then { + type := VisualId_Edge_PackageImport; + children := setChildrenForPackageImport(); + } endif; + if (self.getElement().isDependency()) then { + type := VisualId_Edge_Dependency; + --adding children + children := setChildrenForDependency(); + } endif; + if (self.getElement().isRealization()) then { + type := VisualId_Edge_Realization; + --adding children + children := setChildrenForRealization(); + } endif; + } + else { + --it is a link + var diagType : String = self.getDiagramtype (); + if (diagType = ClassDiagram_P2) then { + type := VisualId_CEdge_Link; + } + else { + if (diagType = ProfileDiagram_P2) then { + type := VisualId_PEdge_Link; + } endif; + } endif; + element := null; + } endif; + + --setting the source and target Anchors + var anchors : OrderedSet (di2::GraphConnector) := self.anchor; + anchors->forEach (gc) { + --log("the anchor is "+ gc.graphElement.repr()); + gc.graphElement; + }; + source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + --adding style + styles := setStyleForEdge(); + + --adding element: already done in View + + --adding the bend points + bendpoints := setBendpointsForEdge(); + + --adding the source and target Anchor + sourceAnchor := setSourceAnchor(); + targetAnchor := setTargetAnchor(); +} + + +--Helpers related to an Edge +-------------------------------- + + +--generic helper for an edge with two children +--takes as input the visual ids of the the two children + +helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) +{ + var child1 := object notation::DecorationNode { + --the id is set automatically + type := VisualId1; + layoutConstraint := object notation::Location { + y := 40; + }; + }; + + --second child + var child2 :=object notation::DecorationNode { + --the id is set automatically + type := VisualId2; + layoutConstraint := object notation::Location { + y := 60; + }; + }; + + return OrderedSet {child1,child2}; +} + +helper setChildrenForRealization(): OrderedSet(notation::Node) +{ + return setChildrenForEdge2Children(VisualId_Edge_Realization_DecoNode1, VisualId_Edge_Realization_DecoNode2); + +} + +helper setChildrenForDependency(): OrderedSet(notation::Node) +{ + -- + -- + -- + -- + -- + -- + return setChildrenForEdge2Children(VisualId_Edge_Dependency_DecoNode1, VisualId_Edge_Dependency_DecoNode2); + +} + +helper setChildrenForGeneralization(): OrderedSet(notation::Node) +{ + -- + -- + -- + + var child1 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_Edge_Generalization_DecoNode; + layoutConstraint := object notation::Location { + y := 40; + }; + }; + + return OrderedSet {child1}; +} + + +helper setChildrenForAssociation(): OrderedSet(notation::Node) +{ + ---------------------------------------------------------------------- + --under an Edge "association" + ----------------------------------------------------------------------- + --In the case that we have an association we will have: + --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: + -- 6 "children" typed with decoration nodes + -- 1 "styles + -- 1 element + -- 1 bendpoints + -- 1 sourceAnchor + -- 1 targetAnchor + ----------------------------------------------------------------------- + + --first child + var child1 := object notation::DecorationNode { + --the id is set automatically + type := VisualId_Edge_Association_DecoNode1; + layoutConstraint := object notation::Location { + y := -20; + }; + }; + + --second child + var child2 :=object notation::DecorationNode { + --association label + type := VisualId_Edge_Association_DecoNode2; + layoutConstraint := object notation::Location { + y := 20; + }; + // make label of association itself (not its endpoints) non visible by default + visible := false; + }; + + --third child + var child3 := object notation::DecorationNode { + --label first association end + type := VisualId_Edge_Association_DecoNode3; + layoutConstraint := object notation::Location { + y := -20; + }; + eAnnotations += noTypeEAnnotation(); + }; + + --fourth child + var child4 := object notation::DecorationNode { + --label 2nd association end + type := VisualId_Edge_Association_DecoNode4; + layoutConstraint := object notation::Location { + y := 20; + }; + eAnnotations += noTypeEAnnotation(); + }; + + --fifth child + var child5 := object notation::DecorationNode { + --multiplicity first association end + type := VisualId_Edge_Association_DecoNode5; + visible := false; + --layoutConstraint := object notation::Location{ + --y := 20; + --x := 20; + --}; + }; + + --sixth child + var child6 := object notation::DecorationNode { + --the id is set automatically + --multiplicity 2nd association end + type := VisualId_Edge_Association_DecoNode6; + visible := false; + --layoutConstraint := object notation::Location { + --y := -20; + --x := -20; + --}; + }; + + --add the set of children to the node + return OrderedSet { + child1, child2, child3, child4, child5, child6 + }; +} + + +helper setStyleForEdge() : OrderedSet(notation::Style) +{ + -- + var style := object notation::FontStyle { + --the id is set automatically + --fontName="Sans Serif"; + }; + + return OrderedSet{style}; +} + +helper setSourceAnchor() : notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setTargetAnchor():notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setBendpointsForEdge():notation::RelativeBendpoints +{ + -- + // var pts : notation::RelativeBendpointList; + // var bendpoints:=object notation::RelativeBendpoints { }; + var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); + + return bendpoints; +} + +helper setChildrenForPackageImport(): OrderedSet(notation::Node) +{ + var child1 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_Edge_PackageImport_DecoNode; + }; + + return OrderedSet {child1}; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto new file mode 100644 index 00000000000..8c7168fa8fd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto @@ -0,0 +1,658 @@ +--Author Manel Fredj-CEA LIST +library HelpersClassDiagram; + + +import ClassDiagVisualIDs; +import NotationQueries; +import GeneralMappingsandHelpers; + + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +mapping di2::GraphNode::classDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape +{ + eAnnotations := setEAnnotations (); + + if (self.getElement().oclIsTypeOf(uml::Class)) then { + type := VisualId_Class; + children := setChildrenForClass(self); + styles := setStylesForClass(); + } endif; + if (self.getElement().oclIsTypeOf(uml::Comment)) then { + type := VisualId_Comment; + children := setChildrenForComment(); + } endif; + if (self.getElement().oclIsTypeOf(uml::Profile)) then { + type := VisualId_Profile; + children := setChildrenForProfile(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Stereotype)) then { + type := VisualId_Stereotype; + children := setChildrenForStereotype(); + } endif; + if (self.getElement().oclIsTypeOf(uml::Package)) then { + type := VisualId_Package; + children := setChildrenForPackage(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Enumeration)) then { + type := VisualId_Enum; + children := setChildrenForEnum(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Interface)) then { + type := VisualId_Interface; + children := setChildrenForInterface(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::PrimitiveType)) then { + type := VisualId_PrimitiveType; + children := setChildrenForPrimitiveType(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::DataType)) then { + type := VisualId_DataType; + children := setChildrenForDataType(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Model)) then { + type := VisualId_Package; + } endif; + if (self.getElement().oclIsTypeOf(uml::Component)) then { + type := VisualId_Component; + children := setChildrenForComponent(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::RedefinableTemplateSignature)) then { + type := VisualId_RedefinableTemplateSig; + children := setChildrenForRedefinableTemplateSignature(self); + } endif; +} + + +--for a class +--first argument is related to the contained operations which are integrated in the third child, i.e. the +--basic compartment typed 7018 +helper setChildrenForClass (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Class_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Class_Attributes; + --the id is set automatically + --set the properties + children := setAttributesForClass(node); + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint:=object notation::Bounds {}; + }; + + -- third child includes operations + var child3 := object notation::BasicCompartment { + type := VisualId_Class_Operations; + --the id is set automatically + --set the operations + children := setOperationsForClass(node); + --set the styles + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- fourth child + var child4 := object notation::BasicCompartment { + type := VisualId_Class_UseCase; + --the id is set automatically + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, + style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + return OrderedSet { + child1, child2, child3, child4 + }; +} + + + +--for a ForRedefinableTemplateSignature + +helper setChildrenForRedefinableTemplateSignature (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + var containedCTP:= object notation::DecorationNode { + type:=VisualId_ContainerofCTP; + + children:= setClassifierTemplateParameters(node); + + var style1 := object notation::SortingStyle { + }; + var style2 := object notation::FilteringStyle { + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint:=object notation::Bounds {}; + + }; + var containedCTPs : OrderedSet(notation::Node); + containedCTPs += containedCTP; + return containedCTPs; +} + +helper setClassifierTemplateParameters(in node:di2::GraphNode):OrderedSet (notation::Node){ + var CTPShapes : OrderedSet(notation::Shape); + var containedCTPs : OrderedSet(ecore::EObject) := node.getClassifierTemplateParameter(); + containedCTPs->forEach (CTP) { + -- + -- + -- + -- + + var CTPShape := object notation::Shape { + type := VisualId_ClassifierTemplateParameter; + element := CTP; + layoutConstraint := object notation::Location {}; + }; + + CTPShapes += CTPShape; + }; + + return CTPShapes; +} + +--for a primitive type +helper setChildrenForPrimitiveType (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_PrimitiveTypeChild; + --the id is set automatically + }; + + --add the set of children to the node + return OrderedSet { + child1 + }; +} + +--for a data type +helper setChildrenForDataType (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := "5035"; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := "7020"; + --the id is set automatically + --set the operations + children := setAttributesForClass(node); + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint:=object notation::Bounds {}; + }; + + -- third child includes operations + var child3 := object notation::BasicCompartment { + type := "7021"; + --the id is set automatically + --set the operations + children := setOperationsForClass(node); + --set the styles + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + --add the set of children to the node + return OrderedSet { + child1, child2, child3 + }; +} + +--for an interface +helper setChildrenForInterface (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := "5011"; + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := "7006"; + --the id is set automatically + --set the operations + children := setAttributesForClass(node); + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint:=object notation::Bounds {}; + }; + + -- third child includes operations + var child3 := object notation::BasicCompartment { + type := "7007"; + --the id is set automatically + --set the operations + children := setOperationsForClass(node); + --set the styles + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- third child includes operations + var child4 := object notation::BasicCompartment { + type := "7008"; + --the id is set automatically + --set the operations + --children := setOperationsForClass(node); + --set the styles + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + --add the set of children to the node + return OrderedSet { + child1, child2, child3, child4 + }; +} + +--for an enumeration +helper setChildrenForEnum (in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Enum_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Enum_Literals; + --set the literals + children := getLiterals(node); + var style1 := object notation::SortingStyle { }; + var style2 := object notation::FilteringStyle { }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + --the id is set automatically + }; + + --add the set of children to the node + return OrderedSet { + child1, child2 + }; +} + + +helper setStylesForClass() : OrderedSet(notation::Style) +{ + var style:=object notation::HintedDiagramLinkStyle { + --the id is set automatically + }; + + return OrderedSet{style}; +} + + +--reusable Helpers +helper setOperations(in node:di2::GraphNode,in VisualId:String): OrderedSet(notation::Node) +{ + var operationsShape : OrderedSet(notation::Node); + var containedOp : OrderedSet(ecore::EObject) := node.getOperations(); + containedOp->forEach (operation) { + var operationShape := object notation::Shape { + --an operation is typed 3013 + type := VisualId; + --fontHeight="8"; + --lineColor="0"; + element := operation; + layoutConstraint := object notation::Location{}; + }; + + operationsShape += operationShape; + }; + + return operationsShape; +} + +helper setAttributes(in node : di2::GraphNode, in VisualId:String) : OrderedSet(notation::Node) +{ + var attributesShape : OrderedSet(notation::Node); + var attributes : OrderedSet(ecore::EObject) := node.getProperties(); + attributes->forEach (attribute) { + var attributeShape := object notation::Shape { + -- an attribute is type 3012 + type := VisualId; + --fontName="Sans Serif"; + --lineColor="0"; + element := attribute; + layoutConstraint := object notation::Location{}; + }; + attributesShape += attributeShape; + }; + + return attributesShape; +} + +--in containedOp:OrderedSet(ecore::EObject) +helper setOperationsForClass(in node:di2::GraphNode): OrderedSet(notation::Node) +{ + return setOperations(node,VisualId_Class_Operation); +} + +--in containedAttr:OrderedSet (ecore::EObject) +helper setAttributesForClass(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + return setAttributes(node,VisualId_Class_Attribute); +} + +--for Enumeration +--in containedAttr:OrderedSet (ecore::EObject) +helper getLiterals(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + var enumLiteralsShape : OrderedSet(notation::Node); + var enumLiterals : OrderedSet(ecore::EObject) := node.getEnumLiterals(); + enumLiterals->forEach (enumLiteral) { + var enumLiteralShape := object notation::Shape { + -- an attribute is typed 3017 + type := VisualId_EnumLiteral; + --fontName="Sans Serif"; + --lineColor="0"; + element := enumLiteral; + layoutConstraint := object notation::Location{}; + }; + enumLiteralsShape += enumLiteralShape; + }; + + return enumLiteralsShape; +} + +--for a component +helper setChildrenForComponent (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Component_child1; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Component_child2; + --the id is set automatically + --set the properties + children := setAttributesForComponent(node); + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- third child + var child3 := object notation::BasicCompartment { + type := VisualId_Component_child3; + --the id is set automatically + --set the operations + children := setOperationsForComponent(node); + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- fourth child + var child4 := object notation::BasicCompartment { + type := VisualId_Component_child4; + --the id is set automatically + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + return OrderedSet { + child1, child2,child3,child4 + }; +} + +--in containedOp:OrderedSet(ecore::EObject) +helper setOperationsForComponent(in node:di2::GraphNode): OrderedSet(notation::Node) +{ + return setOperations(node,VisualId_Component_Operation); +} + +--in containedAttr:OrderedSet (ecore::EObject) +helper setAttributesForComponent(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + return setAttributes(node, VisualId_Component_Attribute); +} + + +--for a stereotype +helper setChildrenForStereotype() : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Stereotype_child1; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Stereotype_child2; + --the id is set automatically + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + + }; + + -- third child + var child3 := object notation::BasicCompartment { + type := VisualId_Stereotype_child3; + --the id is set automatically + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- fourth child + var child4 := object notation::BasicCompartment { + type := VisualId_Stereotype_child4; + --the id is set automatically + var style1 := object notation::SortingStyle { + --the id is set automatically + }; + var style2 := object notation::FilteringStyle { + --the id is set automatically + }; + styles := OrderedSet { + style1, style2 + }; + layoutConstraint := object notation::Bounds {}; + }; + + return OrderedSet { + child1, child2, child3, child4 + }; +} + + +--for a profile in a class diagram +helper setChildrenForProfile (in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Profile_child1; + --the id is set automatically + }; + + -- second child + var child2 := object notation::DecorationNode { + type := VisualId_Profile_child2; + children := addStereotypestoProfile(node); + layoutConstraint := object notation::Bounds {}; + --the id is set automatically + }; + + --add the set of children to the node + return OrderedSet {child1, child2}; +} + +--stereotype +helper addStereotypestoProfile (in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + + var SetofStereotypes : OrderedSet(notation::Node); + node.contained->forEach (elem|elem.oclIsTypeOf(di2::GraphNode)) { + if (elem.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Stereotype))then{ + --create a new stereotype + var stereo:notation::Shape:=elem.oclAsType(di2::GraphNode).map classDiagNode2Shape(); + SetofStereotypes += stereo; + } endif; + }; + + return SetofStereotypes; +} + +--for a package +helper setChildrenForPackage (in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Package_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::DecorationNode { + type := VisualId_Package_Label2; + var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); + containedElements->forEach (containedElement) { + var shape : notation::Shape ::= containedElement.map classDiagNode2Shape(); + children += shape; + }; + }; + + return OrderedSet { + child1, child2 + }; +} + + +--Helpers related to a Comment +-------------------------------- + +helper setChildrenForComment () : OrderedSet(notation::Node) +{ + -- + var child1 := object notation::DecorationNode { + type:=VisualId_Comment_Child; + + }; + return OrderedSet {child1}; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto new file mode 100644 index 00000000000..9b5def30876 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto @@ -0,0 +1,66 @@ + +--Author Manel Fredj-CEA LIST + +library VisualIDs; + +-- for an interface +property VisualId_Interface : String = "2004"; + +-- for a package +property VisualId_Package : String = "2005"; + +--for a profile +property VisualId_Profile : String = "2007"; +property VisualId_Profile_child1 : String = "5026"; +property VisualId_Profile_child2 : String = "7016"; + +--for a stereotype +property VisualId_Stereotype : String = "3010"; +property VisualId_Stereotype_child1 : String = "5014"; +property VisualId_Stereotype_child2 : String = "7011"; +property VisualId_Stereotype_child3 : String = "7012"; +property VisualId_Stereotype_child4 : String = "7013"; + +-- for a class +property VisualId_Class : String = "2008"; + +--for a comment +property VisualId_Comment : String = "2012"; +property VisualId_Comment_Child : String = "5038"; +-- for a data type +property VisualId_DataType : String = "2010"; + +-- for a primitive type +property VisualId_PrimitiveType : String = "2009"; +property VisualId_PrimitiveTypeChild : String = "5032"; + +-- for an enumeration +property VisualId_Enum : String = "2006"; +property VisualId_EnumLiteral : String = "3017"; + +-- for a redefinable Template signature +property VisualId_RedefinableTemplateSig : String = "3015"; +property VisualId_ClassifierTemplateParameter : String = "3031"; +property VisualId_ContainerofCTP : String = "7014"; + +--for a component +property VisualId_Component : String ="2002"; +property VisualId_Component_child1 : String ="5005"; +property VisualId_Component_child2 : String ="7002"; +property VisualId_Component_child3 : String ="7003"; +property VisualId_Component_child4 : String ="7004"; +property VisualId_Component_Attribute : String = "3002"; +property VisualId_Component_Operation : String = "3003"; + +--for a class +property VisualId_Class_Label : String = "5029"; +property VisualId_Class_Attributes : String = "7017"; +property VisualId_Class_Operations : String = "7018"; +property VisualId_Class_UseCase : String = "7019"; + +property VisualId_Package_Label : String = "5020"; +property VisualId_Package_Label2 : String = "7009"; +property VisualId_Enum_Label : String = "5023"; +property VisualId_Enum_Literals : String = "7015"; +property VisualId_Class_Operation : String = "3013"; +property VisualId_Class_Attribute : String = "3012"; diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto new file mode 100644 index 00000000000..1e20a5438df --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto @@ -0,0 +1,162 @@ +--Author Manel Fredj-CEA LIST + +library HelpersEdge; +import GeneralMappingsandHelpers; +import CompositeDiagVisualIDs; + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + +mapping di2::GraphEdge::compositeDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector +{ + ----------------------------------------------------------------------- + --under an Edge "association" + ----------------------------------------------------------------------- + --In the case that we have an association we will have: + --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: + -- 6 "children" typed with decoration nodes + -- 1 "styles + -- 1 element + -- 1 bendpoints + --1 sourceAnchor + --1targetAnchor + ----------------------------------------------------------------------- + + --setting the type and children + if (self.getElement() != null) then { + + if (self.getElement().isGeneralization()) then { + type := VisualId_Edge_GeneralizationComp; + --adding children + children := setChildrenForGeneralization(); + } endif; + if (self.getElement().oclIsTypeOf(uml::Connector)) then { + type := VisualId_Edge_Link; + --adding children + children:=setChildrenForConnector(); + } endif; + } endif; + + --setting the source and target Anchors + var anchors : OrderedSet (di2::GraphConnector) := self.anchor; + anchors->forEach (gc) { + --log("the anchor is "+ gc.graphElement.repr()); + gc.graphElement; + }; + source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + --adding style + styles := setStyleForEdge(); + + --adding element: already done in View + + --adding the bend points + bendpoints := setBendpointsForEdge(); + + --adding the source and target Anchor + sourceAnchor := setSourceAnchor(); + targetAnchor := setTargetAnchor(); +} + + +--Helpers related to an Edge +-------------------------------- + + +--generic helper for an edge with two children +--takes as input the visual ids of the the two children + +helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) +{ + var child1 := object notation::DecorationNode { + --the id is set automatically + type := VisualId1; + layoutConstraint := object notation::Location { + y := 40; + }; + }; + + --second child + var child2 :=object notation::DecorationNode { + --the id is set automatically + type := VisualId2; + layoutConstraint := object notation::Location { + y := 60; + }; + }; + + return OrderedSet {child1,child2}; +} + + +helper setChildrenForGeneralization(): OrderedSet(notation::Node) +{ + -- + -- + -- + + var child1 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_DecoNodeGeneralizationComp; + layoutConstraint := object notation::Location { + y := 40; + }; + }; + + return OrderedSet {child1}; +} + + + +helper setChildrenForConnector(): OrderedSet(notation::Node) +{ + -- + -- + -- + + var child1 := object notation::DecorationNode { + --the id is set automatically + type := VisualId_Edge_Connector_Child; + layoutConstraint := object notation::Location { + y := 60; + }; + }; + + return OrderedSet {child1}; +} + + +helper setStyleForEdge() : OrderedSet(notation::Style) +{ + -- + var style := object notation::FontStyle { + --the id is set automatically + --fontName="Sans Serif"; + }; + + return OrderedSet{style}; +} + +helper setSourceAnchor() : notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setTargetAnchor():notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setBendpointsForEdge():notation::RelativeBendpoints +{ + -- + // var pts : notation::RelativeBendpointList; + // var bendpoints:=object notation::RelativeBendpoints { }; + var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); + + return bendpoints; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto new file mode 100644 index 00000000000..4ba6c5d3fda --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto @@ -0,0 +1,284 @@ +--Author Manel Fredj-CEA LIST +library CompositeStructureDiagram; + +import Converter.Utils.ConverterLibs; +import CompositeDiagVisualIDs; +import GeneralMappingsandHelpers; + + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +mapping di2::GraphNode::compositeDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape +{ + if (self.getElement().oclIsTypeOf(uml::Class)) then { + type := VisualId_Class_Composite; + } endif; + + layoutConstraint := object notation::Bounds { + var size : notation::Size := + self.size.map dimension2Size(); + var relativeLocation: notation::Location :=null; + var location : notation::Location := + self.position.map point2Location(); + if (self.container.oclIsTypeOf(di2::GraphNode))then{ + relativeLocation:=self.container.position. map point2Location(); + x := location.x + relativeLocation.x; + y := location.y + relativeLocation.y; + }else{ + x := location.x; + y := location.y; + }endif; + width := size.width; + height := size.height; + }; + + --adding 3 eAnnotations as in class diagram + eAnnotations := setEAnnotations (); + + if (type = VisualId_Class_Composite) then { + --adding children + children := setChildrenForClassComposite(self); + --adding style + styles := setStylesForClass(); + } endif; +} + + +--------------------------------------------------------------------------- +--set children for composite class + +helper setChildrenForClassComposite(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + var childrenOfCompositeClass: OrderedSet(notation::Node); + + -- + + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Class_Composite_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Class_Composite_Compartment; + --set children as properties + children := setPropertiesForCompositeClass(node.contained); + layoutConstraint:=object notation::Bounds {}; + }; + + + childrenOfCompositeClass := OrderedSet{child1, child2}; + + + --convert ports of contained classes + var childport : notation::Node; + var itsParent : notation::Node; + node.contained->forEach (elem|elem.oclIsTypeOf(di2::GraphNode)) { + + if (elem.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Port)) then { + childport := elem.oclAsType(di2::GraphNode).map compositeDiagPort2Shape(); + var temp: di2::DiagramElement:=elem.oclAsType(di2::GraphNode).getSemanticParent(); + itsParent:= temp.oclAsType(di2::GraphNode).resolveone (notation::Node); + --add the child to the semantic parent + itsParent.children+= childport; + } endif; + }; + + --convert edges in the composite + return childrenOfCompositeClass; +} + +--in contrained attributes: properties or nested classes +helper setPropertiesForCompositeClass(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + + if(node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { + child := node.oclAsType(di2::GraphNode).map ComponentClass2Property(); + setOfChildren += child; + } endif; + if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class)) then { + child := node.oclAsType(di2::GraphNode).map ComponentClass2Class(node.oclAsType(di2::GraphNode)); + setOfChildren += child; + } endif; + }; + + return setOfChildren; +} + + +----------------------------------------------------------------------------- +-- case of properties +mapping di2::GraphNode::ComponentClass2Property() : notation::Shape { + + type := VisualId_Component_Property ; + --seteAnnotation + eAnnotations := setEAnnotations (); + --setchildren + children:=setChildrenForComponentProperty(); + + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + }; + --set element + element := self.getElement().oclAsType(ecore::EObject); +} + +helper setChildrenForComponentProperty() : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_Component_Property_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Component_Property_Compartiment; + layoutConstraint:=object notation::Bounds {}; + }; + + return OrderedSet {child1, child2}; +} + + +----------------------------------------------------------------------------- +-- case of nested classes + +mapping di2::GraphNode::ComponentClass2Class(in node:di2::GraphNode) : notation::Shape { + + type := VisualId_Component_Class; + --seteAnnotation + eAnnotations := setEAnnotations (); + --setchildren + children:=setChildrenForComponentClass(node); + + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + }; + + --set element + element := self.getElement().oclAsType(ecore::EObject); +} + +helper setChildrenForComponentClass(in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_Component_Class_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Component_Class_Compartiment; + + --set children as properties in the case that the nested class contains properties + children:= setPropertiesForCompositeClass(node.contained); + layoutConstraint:=object notation::Bounds {}; + }; + + return OrderedSet{child1, child2}; +} + + +-------------------------------- +--ports + +mapping di2::GraphNode::compositeDiagPort2Shape() : notation::Shape { + + type := VisualId_Port; + --seteAnnotation + eAnnotations := setEAnnotations (); + --setchildren + children:=setChildrenForPort(); + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var parentLocation: notation::Location :=null; + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + var itsparent: di2::DiagramElement:=self.oclAsType(di2::GraphNode).getSemanticParent(); + parentLocation:=itsparent.oclAsType(di2::GraphNode).position. map point2Location(); + x := location.x - parentLocation.x; + y := location.y - parentLocation.y; + width := size.width; + height := size.height; + }; + --set element + element := self.getElement().oclAsType(ecore::EObject); +} + + +helper setChildrenForPort() : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_Port_child1; + layoutConstraint:=object notation::Location { + x:=25; + y:=3; + }; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Port_child2; + layoutConstraint:=object notation::Location { + x:=25; + y:=-10; + }; + }; + + return OrderedSet{child1, child2}; +} + + +helper setStylesForClass() : OrderedSet(notation::Style) +{ + var style:=object notation::HintedDiagramLinkStyle { + --the id is set automatically + }; + + return OrderedSet{style}; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto new file mode 100644 index 00000000000..3383a9a68e5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto @@ -0,0 +1,34 @@ + +--Author Manel Fredj-CEA LIST + +library CompositeDiagVisualIDs; + +--for a generalization within composite diagram +property VisualId_Edge_GeneralizationComp : String = "4015"; +property VisualId_DecoNodeGeneralizationComp : String = "6024"; + +--for a link +property VisualId_Edge_Link : String = "4013"; + +--for a connector +property VisualId_Edge_Connector_Child : String = "6025"; + +--class in a composite diagram +property VisualId_Class_Composite : String = "2073"; +property VisualId_Class_Composite_Label : String = "5156"; +property VisualId_Class_Composite_Compartment : String = "7073"; + +--Property in composite diagram +property VisualId_Component_Property_Label : String = "5126"; +property VisualId_Component_Property_Compartiment : String = "7077"; +property VisualId_Component_Property : String = "3070"; + +--nested Class in composite diagram +property VisualId_Component_Class : String = "3085"; +property VisualId_Component_Class_Label : String = "5155"; +property VisualId_Component_Class_Compartiment : String = "7060"; + +--Port in composite diagram +property VisualId_Port : String = "3069"; +property VisualId_Port_child1 : String = "5125"; +property VisualId_Port_child2 : String = "6029"; diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto new file mode 100644 index 00000000000..950b5d2c6bd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto @@ -0,0 +1,103 @@ + +--Author Manel Fredj-CEA LIST + + +modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; + + +transformation Transfo(in src : di2, out target1 : notation, out target2:di); + + +mapping di2::Diagram::diagram2SashWindowsMngr(): di::SashWindowsMngr +{ + --pageRefsclassandOp + var pageRefs: Set(di::PageRef) := setPageRef(); + --pageList + pageList := setPageList(pageRefs); + + --sashModel + sashModel := setSashModel(); +} + +mapping notation::Diagram::diagram2PageRef(): di::PageRef +{ + emfPageIdentifier := self.oclAsType(ecore::EObject); +} + + +------------------------------------------------------------------------------------------------------------------------- +---------------------------------------- Helpers for di --------------------------------------- +------------------------------------------------------------------------------------------------------------------------- + +helper setPageList(in pagerefs:Set(di::PageRef)): di::PageList +{ + var pageList := object di::PageList { + availablePage := pagerefs; + }; + + return pageList; +}; + + +helper setPageRef(): Set(di::PageRef) +{ + var setPages : Set(di::PageRef) := Set{}; + var page: di::PageRef; + target1.rootObjects()->forEach(diagram|diagram.oclIsTypeOf(notation::Diagram)) { + --avoid empty pages for unsupported diagrams (currently deployment diagram) + if (diagram.oclAsType(notation::Diagram).type != null) then { + page := diagram.oclAsType(notation::Diagram).map diagram2PageRef(); + setPages += page; + } endif; + }; + return setPages; +}; + + +helper setSashModel(): di::SashModel +{ + var sm := object di::SashModel{ + currentSelection:= object di::TabFolder{} ; + windows := setWindows(); + }; + return sm; +}; + +helper setWindows(): Set(di::Window) +{ + var setwindows : Set(di::Window); + setwindows += setWindow(); + return setwindows; +}; + +helper setWindow() : di::Window { + + var child := object di::TabFolder { + + target1.rootObjects()->forEach(diagram|diagram.oclIsTypeOf(notation::Diagram)) { + --avoid empty pages for unsupported diagrams (currently deployment diagram) + if (diagram.oclAsType(notation::Diagram).type != null) then { + var page : di::PageRef = object di::PageRef { + emfPageIdentifier:= diagram.oclAsType(ecore::EObject) + }; + children += page; + } endif; + }; + }; + + var window := object di::Window { + children := Set { child }; + }; + return window; +}; + +--helper SetChildren(): Set(di::PageRef){ + + --var setchildren:Set(di::PageRef):=Set{}; + --var page: di::PageRef; + + --return setchildren; +--}; diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto new file mode 100644 index 00000000000..f88e9680aea --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto @@ -0,0 +1,213 @@ +--Author Manel Fredj-CEA LIST +library Diagram; + +import ClassDiagNodes; +import StateDiagNodes; +import ProfileDiagNodes; +import ClassAndProfileDiagEdges; +import CompositeDiagNodes; +import StateDiagEdges; +import CompositeDiagEdges; + +--import VisualIDs; +import NotationQueries; +import GeneralMappingsandHelpers; + +modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +mapping di2::Diagram::diagram2diagram() : notation::Diagram inherits di2::GraphElement::element2View +{ + --the id is set automatically + --assign type + type := self.getDiagramtype(); + --assign name + name := self.name; + + --assign element + measurementUnit := notation::MeasurementUnit::Pixel; + + --transform contained nodes and edges + + if (type = ClassDiagram_P2) then { + children := setChildrenForClassDiagram(self.contained); + edges := setEdgesForClassAndProfileDiagram(self.contained); + } endif; + if (type = ProfileDiagram_P2) then { + children := setChildrenForProfileDiagram(self.contained); + edges := setEdgesForClassAndProfileDiagram(self.contained); + } endif; + if (type = CompositeStructure_P2) then { + children := setChildrenForCompositeDiagram(self.contained); + edges := setEdgesForCompositeDiagram(self.contained); + } endif; + if (type = StateMachineDiagram_P2) then { + children := setChildrenForStateDiagram(self.contained); + edges := setEdgesForStateDiagram(self.contained); + } endif; + + --Set Style of diagram + if (type != null) then { + styles := setStylesForDiagram(); + } endif; +} + + +-------------------------------------------------------------- +--converting a composite diagram +helper setChildrenForCompositeDiagram(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + var itsParent: notation::Shape; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + --case of containing a class + if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class) ) then { + child := node.oclAsType(di2::GraphNode).map compositeDiagNode2Shape(); + setOfChildren += child; + } endif; + --case of containing a port : map the potr and attach it to the semantic parent + if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Port) ) then { + child := node.oclAsType(di2::GraphNode).map compositeDiagPort2Shape(); + var temp: di2::DiagramElement:=node.oclAsType(di2::GraphNode).getSemanticParent(); + itsParent:= temp.oclAsType(di2::GraphNode).resolveone (notation::Shape); + --add the child to the semantic parent + itsParent.children+= child; + } endif; + }; + + return setOfChildren; +} + +------------------------------------------------------------ +--converting a class diagram +helper setChildrenForClassDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + child := node.oclAsType(di2::GraphNode).map classDiagNode2Shape(); + setOfChildren += child; + }; + + return setOfChildren; +} + +------------------------------------------------------------ +--converting a profile diagram +helper setChildrenForProfileDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + child := node.oclAsType(di2::GraphNode).map profileDiagNode2Shape(); + setOfChildren += child; + }; + + return setOfChildren; +} + +--converting a state diagram +helper setChildrenForStateDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + child := node.oclAsType(di2::GraphNode).map stateDiagNode2Shape(); + setOfChildren += child; + }; + + return setOfChildren; +} + +helper setEdgesForClassAndProfileDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) +{ + var setofEdges : OrderedSet(notation::Edge); + var edge : notation::Edge; + contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { + edge := node.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); + setofEdges += edge; + }; + contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { + composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { + edge := elem.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); + setofEdges += edge; + }; + composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { + prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { + edge := connect.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); + setofEdges += edge; + }; + }; + }; + + return setofEdges; +} + +helper setEdgesForCompositeDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) +{ + var setofEdges : OrderedSet(notation::Edge); + var edge : notation::Edge; + contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { + edge := node.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); + setofEdges += edge; + }; + contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { + composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { + edge := elem.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); + setofEdges += edge; + }; + composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { + prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { + edge := connect.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); + setofEdges += edge; + }; + }; + }; + + return setofEdges; +} + +helper setEdgesForStateDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) +{ + var setofEdges : OrderedSet(notation::Edge); + var edge : notation::Edge; + contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { + edge := node.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); + setofEdges += edge; + }; + contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { + composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { + edge := elem.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); + setofEdges += edge; + }; + composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { + prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { + edge := connect.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); + setofEdges += edge; + }; + }; + }; + + return setofEdges; +} + +-------------------------------- +--Helpers related to a diagram +helper setStylesForDiagram() : OrderedSet (notation::Style) +{ + -- + + var setofStyles : OrderedSet(notation::Style); + var style := object notation::DiagramStyle { + --the id is set automatically + }; + + setofStyles := OrderedSet{style}; + + return setofStyles; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto new file mode 100644 index 00000000000..b54734ce946 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto @@ -0,0 +1,25 @@ +--Author Manel Fredj-CEA LIST + +library ElementType; + +--diagram types in notation (Papyrus MDT -- P2) +property ClassDiagram_P2 : String = "PapyrusUMLClassDiagram"; +property ProfileDiagram_P2 : String = "PapyrusUMLProfileDiagram"; +property CompositeStructure_P2 : String = "CompositeStructure"; +property ActivityDiagram_P2 : String = "PapyrusUMLActivityDiagram"; +property SequenceDiagram_P2 : String = "PapyrusUMLSequenceDiagram"; --todo: check for papyrus 2 the actual name +property ComponentDiagram_P2 : String = ""; --todo: check for papyrus 1 the actual name +property StateMachineDiagram_P2 : String = "PapyrusUMLStateMachineDiagram"; +property UseCaseDiagram_P2 : String = "UseCase"; + +--diagram types in di2 (Papyrus 1 -- P1) +property ClassDiagram_P1 : String = "ClassDiagram"; +-- property ProfileDiagram_P1 --no specific diagram in P1 (class diagram), getDiagramType returns code in function of UML model +property CompositeStructure_P1 : String = "CompositeStructureDiagram"; +property ActivityDiagram_P1 : String = "ActivityDiagram"; +property SequenceDiagram_P1 : String = "SequenceDiagram"; +property ComponentDiagram_P1 : String = "ComponentDiagram"; +property StateMachineDiagram_P1 : String = "StateMachineDiagram"; +property UseCaseDiagram_P1 : String = "UseCaseDiagram"; +-- does not exist in MDT +-- property DeploymentDiagram_P1 : String = "DeploymentDiagram"; \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto new file mode 100644 index 00000000000..becc23eefc9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto @@ -0,0 +1,136 @@ +--Author Manel Fredj-CEA LIST +library GeneralMappings; + +import Converter.Utils.ConverterLibs; +import NotationQueries; + + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +------------------------------------------------------------------------------------------------------------------------- +---------------------------------------- Generic Mappings --------------------------------------- +------------------------------------------------------------------------------------------------------------------------- +abstract mapping di2::GraphElement::element2View() : notation::View +{ + --assign visibility attribute (it seems that this is not supported by Papyrus MDT + -- if false, diagram is visible but has no contents + --visible := self.isVisible; + visible := true; + + element := self.getElement().oclAsType(ecore::EObject); +} + + +mapping di2::GraphEdge::edge2Connector() : notation::Connector inherits di2::GraphElement::element2View +{ + lineColor := self.borderColor.rgb2int(); +} + +mapping di2::GraphNode::node2Shape() : notation::Shape inherits di2::GraphElement::element2View +{ + --assign colors and bounds + lineColor := self.borderColor.rgb2int(); + fillColor := self.backgroundColor.rgb2int(); + fontColor := self.fontColor.rgb2int(); + + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.oclAsType(di2::GraphNode).size.map dimension2Size(); + + var relativeLocation: notation::Location :=null; + + var location : notation::Location := self.position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + if (self.container.oclIsTypeOf(di2::GraphNode)) then { + // correct position (why necessary??) of nested items + y := y - 20; + } endif; + } +} + +------------------------------------------------------------------------------------------------------------------------- +---------------------------------------- Mappings --------------------------------------- +------------------------------------------------------------------------------------------------------------------------- + +mapping di2::Dimension::dimension2Size() : notation::Size +{ + width := self.dimensionGetWidth(); + height := self.dimensionGetHeight(); +} + +-- transformation mapping dimension into location +mapping di2::Point::point2Location() : notation::Location +{ + x := self.pointGetX(); + y := self.pointGetY(); + +} + +------------------------------------------------------------------------------------------------------------------------- +---------------------------------------- Helpers --------------------------------------- +------------------------------------------------------------------------------------------------------------------------- + + +--Set EAnnotation: not specific to a diagram (it is used in class diagram and composite diagram) +-------------------------------- +helper setEAnnotations() : OrderedSet (ecore::EAnnotation) +{ + -- first eAnnotation + var eAnnot1 := object ecore::EAnnotation { + --the id is set automatically + --eAnnot1.eModelElement:=self.resolveone(notation::Node); + source := "ShadowFigure"; + details := object ecore::EStringToStringMapEntry { + key := "ShadowFigure_Value"; + value := "false"; + }; + }; + + -- second annotation + var eAnnot2 := object ecore::EAnnotation { + --the id is set automatically + source := "displayNameLabelIcon"; + details := object ecore::EStringToStringMapEntry { + key := "displayNameLabelIcon_value"; + value := "false"; + }; + }; + + -- third annotation + var eAnnot3 := object ecore::EAnnotation { + -- the id is set automatically + source := "QualifiedName"; + details := object ecore::EStringToStringMapEntry { + key := "QualifiedNameDepth"; + value := "1000"; + }; + }; + + -- add the set of annotations to the node + return OrderedSet { + eAnnot1, eAnnot2, eAnnot3 + }; +} + +--suppresses showing type information for an element (used for associations by default) +helper noTypeEAnnotation() : OrderedSet (ecore::EAnnotation) +{ + var eAnnotationNoType := object ecore::EAnnotation { + --the id is set automatically + --eAnnot1.eModelElement:=self.resolveone(notation::Node); + source := "CustomAppearance_Annotation"; + details := object ecore::EStringToStringMapEntry { + key := "CustomAppearance_MaskValue"; + value := "14"; + }; + }; + return OrderedSet { + eAnnotationNoType + }; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto new file mode 100644 index 00000000000..83f1850a146 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto @@ -0,0 +1,168 @@ + +--Author Manel Fredj-CEA LIST + +import ElementType; +import Converter.Utils.ConverterLibs; // for getElement + +modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +transformation Transfo(in src : di2, out target1 : notation, out target2:di); + + +------------------------------------------------------------------------------------------------------------------------- +---------------------------------------- QUERIES for notation --------------------------------------- +------------------------------------------------------------------------------------------------------------------------- + +// in Java already +--query di2::RGB::RGB2Int() : Integer +--{ +-- return 0; +-- -- TODO: check the conversion form RGB to int +--} + + +query di2::Diagram::getDiagramtype() : String +{ + --class diagram + if (self.type = ClassDiagram_P1) then { + if (self.getElement().oclIsTypeOf(uml::Profile)) then { + return ProfileDiagram_P2.oclAsType(String); + } + else { + return ClassDiagram_P2.oclAsType(String); + } endif; + } endif; + --composite diagram + if (self.type = CompositeStructure_P1) then { + return CompositeStructure_P2.oclAsType(String); + } endif; + --activity diagram + if (self.type = ActivityDiagram_P1) then { + return ActivityDiagram_P2.oclAsType(String); + } endif; --TODO: check for papyrus 1 le type + --sequence diagram + if (self.type = SequenceDiagram_P1) then { + return SequenceDiagram_P2.oclAsType(String); + } endif; + --component diagram + if (self.type = ComponentDiagram_P1) then { + return ComponentDiagram_P1.oclAsType(String); + } endif; --TODO: check for papyrus 2 le type + --state Machine diagram + if (self.type = StateMachineDiagram_P1) then { + return StateMachineDiagram_P2; + } endif; + --Use case diagram + if (self.type = UseCaseDiagram_P1) then { + return UseCaseDiagram_P2; + } endif; + --otherwise + return null; +} + +query di2::GraphElement::getDiagramtype() : String { + var parent : Stdlib::Element := self.container(); + + if (parent.oclIsTypeOf (di2::Diagram)) then { + return parent.oclAsType (di2::Diagram).getDiagramtype(); + } + else { + if (parent.oclIsTypeOf (di2::GraphElement)) then { + return parent.oclAsType (di2::GraphElement).getDiagramtype(); + } endif; + } endif; + return null; +} + +query di2::GraphNode::getOperations() : OrderedSet(ecore::EObject) +{ + return self.getSubElementsOfType("Operation"); +} + + +query di2::GraphNode::getProperties() : OrderedSet(ecore::EObject) +{ + return self.getSubElementsOfType("Property"); +} + +query di2::GraphNode::getEnumLiterals() : OrderedSet(ecore::EObject) +{ + return self.getSubElementsOfType("EnumerationLiteral"); +} + +query di2::GraphNode::getSubElementsOfType(type : String) : OrderedSet(ecore::EObject) +{ + var containedSubElements : OrderedSet(ecore::EObject); + var elem : uml::Element; + + self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + + if (node.oclAsType(di2::GraphNode).contained != null) then + { + var contained:OrderedSet(di2::DiagramElement) := node.oclAsType(di2::GraphNode).contained; + contained->forEach (op|op.oclIsTypeOf(di2::GraphNode)){ + elem := op.oclAsType(di2::GraphNode).semanticModel.oclAsType(di2::Uml1SemanticModelBridge).element; + if (elem.metaClassName() = type) then { + containedSubElements += elem.oclAsType(ecore::EObject); + } endif; + }; + } endif; + }; + return containedSubElements; +} + +query di2::GraphNode::getClassifierTemplateParameter():OrderedSet(ecore::EObject){ + --containedCTPs stands for contained "Classifier Template Parameters" + var containedCTPs: OrderedSet(ecore::EObject); + var elem : uml::Element; + + self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)){ + node.oclAsType(di2::GraphNode).contained->forEach(subnode|subnode.oclIsTypeOf(di2::GraphNode)) { + elem:=subnode.oclAsType(di2::GraphNode).getElement(); + if (elem.oclIsTypeOf(uml::ClassifierTemplateParameter)) then { + containedCTPs += elem.oclAsType(ecore::EObject); + } endif; + }; + }; + + return containedCTPs; +} + +query di2::GraphNode::getSemanticParent(): di2::DiagramElement { + + if (self.getElement().oclIsTypeOf(uml::RedefinableTemplateSignature)) then { + return self.semanticParent; + } endif; + + if (self.getElement().oclIsTypeOf(uml::Port))then{ + return self.semanticParent; + } endif; + + return null; +} + +query di2::GraphNode::getSubElementsOfPackage() : OrderedSet(di2::GraphNode) +{ + var containedElements : OrderedSet(di2::GraphNode); + + self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + if (node.oclAsType(di2::GraphNode).getElement().oclIsKindOf(uml::Element)) then + { + containedElements +=node.oclAsType(di2::GraphNode); + } endif; + }; + return containedElements; +} + +query di2::GraphEdge::getAnchors() +{ + var anchors:OrderedSet (di2::GraphConnector):= self.anchor; + anchors->forEach (gc) { + --log("the anchor is " + gc.metaClassName()); + }; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto new file mode 100644 index 00000000000..162d0f27d1b --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto @@ -0,0 +1,273 @@ +--Author Ansgar Radermacher - CEA LIST +library ProfileDiagram; + +import Converter.Utils.ConverterLibs; +import ProfileDiagVisualIDs; +import GeneralMappingsandHelpers; + + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +mapping di2::GraphNode::profileDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape +{ + --add 3 eAnnotations as in class diagram + eAnnotations := setEAnnotations (); + + if (self.getElement().oclIsTypeOf(uml::Stereotype)) then { + type := VisualId_Stereotype; + children := setChildrenForStereotype(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::ElementImport)) then { + // TODO: in Papyrus 1, meta-classes refer to element imports, but not all element imports are meta-classes + type := VisualId_Metaclass; + children := setChildrenForMetaclass(self); + // replace element import by meta-class reference + element := self.getSemanticModel().getMetaclassRef().oclAsType(ecore::EObject); + } endif; + if (self.getElement().oclIsTypeOf(uml::Comment)) then { + type := VisualId_Comment; + children := setChildrenForComment(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Package)) then { + type := VisualId_Package; + children := setChildrenForPackage(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Profile)) then { + type := VisualId_Profile; + children := setChildrenForProfile(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::DataType)) then { + type := VisualId_DataType; + children := setChildrenForDataType(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Enumeration)) then { + type := VisualId_Enum; + children := setChildrenForEnum(self); + } endif; +} + + +--------------------------------------------------------------------------- +--set children for stereotype + +helper setChildrenForStereotype(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Stereotype_DecoNode; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Stereotype_Label; + styles := OrderedSet { + object notation::SortingStyle { }, + object notation::FilteringStyle { } + }; + layoutConstraint := object notation::Bounds {}; + }; + + -- third child + var child3 := object notation::BasicCompartment { + type := VisualId_Stereotype_Compartment; + --set children as properties + children:= setPropertiesForStereotype(node.contained); + layoutConstraint := object notation::Bounds {}; + }; + + return OrderedSet { + child1, child2, child3 + }; +} + +--in contained attributes: properties or nested classes +helper setPropertiesForStereotype(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren : OrderedSet(notation::Node); + --var child : notation::Node; + + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + node.oclAsType(di2::GraphNode).contained->forEach (subNode|subNode.oclIsTypeOf(di2::GraphNode)) { + if(subNode.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { + var child : notation::Shape := subNode.oclAsType(di2::GraphNode).map stereotype2Property(); + -- var child : notation::Shape; + setOfChildren += child; + } endif; + }; + }; + + return setOfChildren; +} + +----------------------------------------------------------------------------- +-- case of properties +mapping di2::GraphNode::stereotype2Property() : notation::Shape { + + type := VisualId_StereotypeProperty; + + --set element + element := self.getElement().oclAsType(ecore::EObject); + + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + }; +} + + +helper setChildrenForMetaclass(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Metaclass_DecoNode; + --the id is set automatically + }; + + return OrderedSet { + child1 + }; +} + +helper setChildrenForComment(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Comment_DecoNode; + --the id is set automatically + }; + + return OrderedSet { + child1 + }; +} + +helper setChildrenForProfile(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Profile_DecoNode1; + }; + var child2 := object notation::DecorationNode { + type := VisualId_Profile_DecoNode2; + + var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); + containedElements->forEach (containedElement) { + var shape : notation::Shape ::= containedElement.map profileDiagNode2Shape(); + children += shape; + }; + }; + + return OrderedSet { + child1, child2 + }; +} + +helper setChildrenForPackage(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Package_DecoNode1; + }; + var child2 := object notation::DecorationNode { + type := VisualId_Package_DecoNode2; + var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); + containedElements->forEach (containedElement) { + var shape : notation::Shape ::= containedElement.map profileDiagNode2Shape(); + children += shape; + }; + }; + + return OrderedSet { + child1, child2 + }; +} + +--------------------------------------------------------------------------- +--set children for enumeration +helper setChildrenForEnum(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + var childrenOfStereotype: OrderedSet(notation::Node); + + -- + + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Enum_DecoNode; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_Enum_BasicCompartment; + children := getEnumLiterals(node); + layoutConstraint := object notation::Bounds {}; + }; + + childrenOfStereotype := OrderedSet { + child1, child2 + }; + + --convert edges in the composite + + return childrenOfStereotype; +} + +--for enumeration literals +helper getEnumLiterals(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + var enumLiteralsShape : OrderedSet(notation::Node); + var enumLiterals : OrderedSet(ecore::EObject) := node.getEnumLiterals(); + enumLiterals->forEach (enumLiteral) { + var enumLiteralShape := object notation::Shape { + type := VisualId_EnumLiteral; + --fontName="Sans Serif"; + --lineColor="0"; + element := enumLiteral; + layoutConstraint := object notation::Location{}; + }; + enumLiteralsShape += enumLiteralShape; + }; + + return enumLiteralsShape; +} + +helper setChildrenForDataType(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_DataType_DecoNode; + }; + + -- second child + var child2 := object notation::BasicCompartment { + type := VisualId_DataType_CompartmentAttr; + --TODO set children + layoutConstraint := object notation::Bounds {}; + }; + + -- third child + var child3 := object notation::BasicCompartment { + type := VisualId_DataType_CompartmentOper; + --set children as properties + --children:= setPropertiesForStereotype(node.contained); + layoutConstraint := object notation::Bounds {}; + }; + + return OrderedSet { + child1, child2, child3 + }; +} diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto new file mode 100644 index 00000000000..3fa75c813ef --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto @@ -0,0 +1,55 @@ + +--Author Ansgar Radermacher-CEA LIST + +library ProfileDiagVisualIDs; + +--profile +property VisualId_Profile : String = "1030"; +property VisualId_Profile_DecoNode1 : String = "1047"; +property VisualId_Profile_DecoNode2 : String = "1042"; + +--package +property VisualId_Package : String = "2007"; +property VisualId_Package_DecoNode1 : String = "5026"; +property VisualId_Package_DecoNode2 : String = "1005"; + +--profile in package (currently unused) +property VisualId_NestedProfile : String = "1024"; +property VisualId_NestedProfile_DecoNode1 : String = "1050"; +property VisualId_NestedProfile_DecoNode2 : String = "1051"; + +--package in package (currently unused) +property VisualId_NestedPackage : String = "1012"; +property VisualId_NestedPackage_DecoNode1 : String = "1010"; +property VisualId_NestedPackage_DecoNode2 : String = "11"; + +--enumeration +property VisualId_Enum : String = "2006"; +property VisualId_Enum_DecoNode : String = "5023"; +property VisualId_Enum_BasicCompartment : String = "1063"; +property VisualId_EnumLiteral : String = "1037"; + +--stereotype +property VisualId_Stereotype : String = "1026"; +property VisualId_Stereotype_DecoNode : String = "1034"; +property VisualId_Stereotype_Label : String = "1019"; +property VisualId_Stereotype_Compartment : String = "1071"; + +--datatype +property VisualId_DataType : String = "2010"; +property VisualId_DataType_DecoNode : String = "5035"; +property VisualId_DataType_CompartmentAttr : String = "1067"; +property VisualId_DataType_CompartmentOper : String = "1068"; + +--property in stereotype +property VisualId_StereotypeProperty : String = "3002"; +property VisualId_StereotypeProperty_Label : String = "5001"; +property VisualId_StereotypeProperty_Compartment : String = "5002"; + +--metaclass +property VisualId_Metaclass : String = "1031"; +property VisualId_Metaclass_DecoNode : String = "1084"; + +--comment +property VisualId_Comment : String = "1002"; +property VisualId_Comment_DecoNode : String = "3"; diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto new file mode 100644 index 00000000000..bfbe84eb39b --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto @@ -0,0 +1,160 @@ +--Author Manel Fredj-CEA LIST + +library HelpersEdge; +import GeneralMappingsandHelpers; +import StateDiagVisualIDs; + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + +mapping di2::GraphEdge::stateDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector +{ + ----------------------------------------------------------------------- + --under an Edge "association" + ----------------------------------------------------------------------- + --In the case that we have an association we will have: + --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: + -- 6 "children" typed with decoration nodes + -- 1 "styles + -- 1 element + -- 1 bendpoints + --1 sourceAnchor + --1targetAnchor + ----------------------------------------------------------------------- + + --setting the type and children + if (self.getElement() != null) then { + + if (self.getElement().oclIsTypeOf(uml::Transition)) then { + type := VisualId_Edge_Transition; + --adding children + children := setChildrenForTransition(); + } endif; + } + else { + --type := VisualId_Edge_Link; + --adding children + } endif; + + --setting the source and target Anchors + var anchors : OrderedSet (di2::GraphConnector) := self.anchor; + anchors->forEach (gc) { + --log("the anchor is "+ gc.graphElement.repr()); + gc.graphElement; + }; + source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); + --adding style + styles := setStyleForEdge(); + + --adding element: already done in View + + --adding the bend points + bendpoints := setBendpointsForEdge(); + + --adding the source and target Anchor + sourceAnchor := setSourceAnchor(); + targetAnchor := setTargetAnchor(); +} + + +--Helpers related to an Edge +-------------------------------- + + +--generic helper for an edge with two children +--takes as input the visual ids of the the two children + +helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) +{ + var child1 := object notation::DecorationNode { + --the id is set automatically + type := VisualId1; + layoutConstraint := object notation::Location { + y := 40; + }; + }; + + --second child + var child2 :=object notation::DecorationNode { + --the id is set automatically + type := VisualId2; + layoutConstraint := object notation::Location { + y := 60; + }; + }; + + return OrderedSet {child1,child2}; +} + + +helper setChildrenForTransition(): OrderedSet(notation::Node) +{ + -- + -- + -- + + var child1 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_Edge_Transition_DecoNode1; + layoutConstraint := object notation::Location { + y := 10; + }; + }; + var child2 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_Edge_Transition_DecoNode2; + layoutConstraint := object notation::Location { + y := 20; + }; + }; + var child3 := object notation::DecorationNode { + --the id is set automatically + --type := VisualId_DecoNodeGeneralization; + type := VisualId_Edge_Transition_DecoNode3; + layoutConstraint := object notation::Location { + y := 20; + }; + }; + + return OrderedSet { + child1, child2, child3 + }; +} + + +helper setStyleForEdge() : OrderedSet(notation::Style) +{ + -- + var style := object notation::FontStyle { + --the id is set automatically + --fontName="Sans Serif"; + }; + + return OrderedSet{style}; +} + +helper setSourceAnchor() : notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setTargetAnchor():notation::Anchor +{ + return object notation::IdentityAnchor { }; +} + + +helper setBendpointsForEdge():notation::RelativeBendpoints +{ + -- + // var pts : notation::RelativeBendpointList; + // var bendpoints:=object notation::RelativeBendpoints { }; + var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); + + return bendpoints; +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto new file mode 100644 index 00000000000..60802fb3c3f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto @@ -0,0 +1,308 @@ +--Author Manel Fredj-CEA LIST +library StateDiagram; + +import Converter.Utils.ConverterLibs; +import StateDiagVisualIDs; +import GeneralMappingsandHelpers; + + +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; +modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; +modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; + + +mapping di2::GraphNode::stateDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape +{ + --add 3 eAnnotations as in class diagram + eAnnotations := setEAnnotations (); + + if (self.getElement().oclIsTypeOf(uml::State)) then { + type := VisualId_State; + children := setChildrenForState(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::StateMachine)) then { + type := VisualId_StateMachine; + children := setChildrenForStateMachine(self); + } endif; + if (self.getElement().oclIsTypeOf(uml::Comment)) then { + -- type := VisualId_Comment; + } endif; + if (self.getElement().oclIsTypeOf(uml::Region)) then { + type := VisualId_Region; + children := setChildrenForRegion(self); + eAnnotations += object ecore::EAnnotation { + source := "RegionAnnotationKey"; + details := object ecore::EStringToStringMapEntry { + key := "RegionZoneKey"; + value := ""; + }; + }; + } endif; + if (self.getElement().oclIsTypeOf(uml::FinalState)) then { + type := VisualId_FinalState; + children := setChildrenForPseudoState (self, VisualId_FinalState_DecoNode1, VisualId_FinalState_DecoNode2); + } endif; + if (self.getElement().oclIsTypeOf(uml::ConnectionPointReference)) then { + type := VisualId_ConnectionPoint; + children := setChildrenForPseudoState (self, VisualId_ConnectionPoint_DecoNode1, VisualId_ConnectionPoint_DecoNode2); + } endif; + if (self.getElement().oclIsTypeOf(uml::Pseudostate)) then { + var pseudoState := self.getElement().oclAsType(uml::Pseudostate); + if (pseudoState.kind = uml::PseudostateKind::initial) then { + type := VisualId_InitialState; + children := setChildrenForPseudoState (self, VisualId_InitialState_DecoNode1, VisualId_InitialState_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::shallowHistory) then { + type := VisualId_ShallowHistoryState; + children := setChildrenForPseudoState (self, VisualId_ShallowHistoryState_DecoNode1, VisualId_ShallowHistoryState_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::deepHistory) then { + type := VisualId_DeepHistoryState; + children := setChildrenForPseudoState (self, VisualId_DeepHistoryState_DecoNode1, VisualId_DeepHistoryState_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::choice) then { + type := VisualId_Choice; + children := setChildrenForPseudoState (self, VisualId_Choice_DecoNode1, VisualId_Choice_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::join) then { + type := VisualId_Choice; + children := setChildrenForPseudoState (self, VisualId_Choice_DecoNode1, VisualId_Choice_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::fork) then { + type := VisualId_Fork; + children := setChildrenForPseudoState (self, VisualId_Fork_DecoNode1, VisualId_Fork_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::junction) then { + type := VisualId_Junction; + children := setChildrenForPseudoState (self, VisualId_Junction_DecoNode1, VisualId_Junction_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::terminate) then { + type := VisualId_Terminate; + children := setChildrenForPseudoState (self, VisualId_Terminate_DecoNode1, VisualId_Terminate_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::entryPoint) then { + type := VisualId_EntryPoint; + children := setChildrenForPseudoState (self, VisualId_EntryPoint_DecoNode1, VisualId_EntryPoint_DecoNode2); + } endif; + if (pseudoState.kind = uml::PseudostateKind::exitPoint) then { + type := VisualId_ExitPoint; + children := setChildrenForPseudoState (self, VisualId_ExitPoint_DecoNode1, VisualId_ExitPoint_DecoNode2); + } endif; + } endif; +} + + +helper setChildrenForPseudoState(in node : di2::GraphNode, in visualID1 : String, in visualID2 : String) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := visualID1; + layoutConstraint := object notation::Location { + x := 20 + }; + }; + var child2 := object notation::DecorationNode { + type := visualID2; + layoutConstraint := object notation::Location { + x := 20 + }; + }; + return OrderedSet { + child1, child2 + }; +}; + +--------------------------------------------------------------------------- +--set children for state + +helper setChildrenForState(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_State_DecoNode1; + }; + + -- first child + var child2 := object notation::DecorationNode { + type:=VisualId_State_DecoNode2; + }; + /* + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Class_Composite_Compartiment; + --set children as properties + children:= setPropertiesForState(node.contained); + layoutConstraint:=object notation::Bounds {}; + }; + */ + --convert edges in the composite + + return OrderedSet { + child1, child2 + }; +} + +helper setChildrenForStateMachine(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_StateMachine_DecoNode1; + }; + var child2 := object notation::DecorationNode { + type := VisualId_StateMachine_DecoNode2; + var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); + containedElements->forEach (containedElement) { + var shape : notation::Shape ::= containedElement.map stateDiagNode2Shape(); + if (shape.type != "") then { + --don't add invalid IDs + children += shape; + } endif; + }; + }; + + return OrderedSet { + child1, child2 + }; +} + +helper setChildrenForRegion(in node : di2::GraphNode) : OrderedSet(notation::Node) +{ + -- first child + var child1 := object notation::DecorationNode { + type := VisualId_Region_DecoNode; + var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); + containedElements->forEach (containedElement) { + var shape : notation::Shape ::= containedElement.map stateDiagNode2Shape(); + if (shape.type != "") then { + --don't add invalid IDs + children += shape; + } endif; + }; + }; + + return OrderedSet { + child1 + }; +} + +/* +--in contrained attributes: properties or nested classes +helper setPropertiesForState(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) +{ + var setOfChildren:OrderedSet(notation::Node); + var child:notation::Node; + contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { + + if(node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { + child := node.oclAsType(di2::GraphNode).map ComponentClass2Property(); + setOfChildren += child; + } endif; + if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class)) then { + child := node.oclAsType(di2::GraphNode).map ComponentClass2Class(node.oclAsType(di2::GraphNode)); + setOfChildren += child; + } endif; + }; + + return setOfChildren; +} + + +----------------------------------------------------------------------------- +-- case of properties +mapping di2::GraphNode::ComponentClass2Property() : notation::Shape { + + type := VisualId_Component_Property ; + --seteAnnotation + eAnnotations := setEAnnotations (); + --setchildren + children:=setChildrenForComponentProperty(); + + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + }; + --set element + element := self.getElement().oclAsType(ecore::EObject); +} + +helper setChildrenForComponentProperty() : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_Component_Property_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Component_Property_Compartiment; + layoutConstraint:=object notation::Bounds {}; + }; + + return OrderedSet {child1, child2}; +} + + +----------------------------------------------------------------------------- +-- case of nested classes + +mapping di2::GraphNode::ComponentClass2Class(in node:di2::GraphNode) : notation::Shape { + + type := VisualId_Component_Class; + --seteAnnotation + eAnnotations := setEAnnotations (); + --setchildren + children:=setChildrenForComponentClass(node); + + --set size and width and high + layoutConstraint := object notation::Bounds { + var size : notation::Size := self.size.map dimension2Size(); + var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); + x := location.x; + y := location.y; + width := size.width; + height := size.height; + }; + + --set element + element := self.getElement().oclAsType(ecore::EObject); +} + +helper setChildrenForComponentClass(in node:di2::GraphNode) : OrderedSet(notation::Node) +{ + -- + -- + -- + -- + + -- first child + var child1 := object notation::DecorationNode { + type:=VisualId_Component_Class_Label; + --the id is set automatically + }; + + -- second child + var child2 := object notation::BasicCompartment { + type:=VisualId_Component_Class_Compartiment; + + --set children as properties in the case that the nested class contains properties + children:= setPropertiesForState(node.contained); + layoutConstraint:=object notation::Bounds {}; + }; + + return OrderedSet{child1, child2}; +} + + +*/ \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto new file mode 100644 index 00000000000..2ff2ab2c6fb --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto @@ -0,0 +1,84 @@ + +--Author Ansgar Radermacher -CEA LIST + +library StateDiagVisualIDs; + +--transition +property VisualId_Edge_Transition : String = "7000"; +property VisualId_Edge_Transition_DecoNode1 : String = "7001"; +property VisualId_Edge_Transition_DecoNode2 : String = "7002"; +property VisualId_Edge_Transition_DecoNode3 : String = "7003"; + +--state machine +property VisualId_StateMachine : String = "2000"; +property VisualId_StateMachine_DecoNode1 : String = "2001"; +property VisualId_StateMachine_DecoNode2 : String = "2002"; + +--region +property VisualId_Region : String = "3000"; +property VisualId_Region_DecoNode : String = "3002"; + +--final state (pseudo state) +property VisualId_FinalState : String = "5000"; +property VisualId_FinalState_DecoNode1 : String = "5001"; +property VisualId_FinalState_DecoNode2 : String = "5002"; + +--state +property VisualId_State : String = "6000"; +property VisualId_State_DecoNode1 : String = "6001"; +property VisualId_State_DecoNode2 : String = "6002"; + +--initial state (pseudo state) +property VisualId_InitialState : String = "8000"; +property VisualId_InitialState_DecoNode1 : String = "8001"; +property VisualId_InitialState_DecoNode2 : String = "8002"; + +--join (pseudo state) +property VisualId_Join : String = "9000"; +property VisualId_Join_DecoNode1 : String = "9001"; +property VisualId_Join_DecoNode2 : String = "9002"; + +--fork (pseudo state) +property VisualId_Fork : String = "10000"; +property VisualId_Fork_DecoNode1 : String = "10001"; +property VisualId_Fork_DecoNode2 : String = "10002"; + +--choice point (pseudo state) +property VisualId_Choice : String = "11000"; +property VisualId_Choice_DecoNode1 : String = "11001"; +property VisualId_Choice_DecoNode2 : String = "11002"; + +--junction (pseudo state) +property VisualId_Junction : String = "12000"; +property VisualId_Junction_DecoNode1 : String = "12001"; +property VisualId_Junction_DecoNode2 : String = "12002"; + +--shallow history state (pseudo state) +property VisualId_ShallowHistoryState : String = "13000"; +property VisualId_ShallowHistoryState_DecoNode1 : String = "13001"; +property VisualId_ShallowHistoryState_DecoNode2 : String = "13002"; + +--deep history state (pseudo state) +property VisualId_DeepHistoryState : String = "14000"; +property VisualId_DeepHistoryState_DecoNode1 : String = "14001"; +property VisualId_DeepHistoryState_DecoNode2 : String = "14002"; + +--termination (pseudo state) +property VisualId_Terminate : String = "15000"; +property VisualId_Terminate_DecoNode1 : String = "15001"; +property VisualId_Terminate_DecoNode2 : String = "15002"; + +--entry point (pseudo state) +property VisualId_EntryPoint : String = "16000"; +property VisualId_EntryPoint_DecoNode1 : String = "16001"; +property VisualId_EntryPoint_DecoNode2 : String = "16002"; + +--exit point (pseudo state) +property VisualId_ExitPoint : String = "17000"; +property VisualId_ExitPoint_DecoNode1 : String = "17001"; +property VisualId_ExitPoint_DecoNode2 : String = "17002"; + +--connection point (pseudo state) +property VisualId_ConnectionPoint : String = "18000"; +property VisualId_ConnectionPoint_DecoNode1 : String = "18001"; +property VisualId_ConnectionPoint_DecoNode2 : String = "18002"; \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto new file mode 100644 index 00000000000..52979027ff7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto @@ -0,0 +1,25 @@ + +--Author Manel Fredj-CEA LIST + +import DiTransformations; +--import NotationMappingsandHelpers; +import Diagram; + +modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; +modeltype di2 uses 'http://www.papyrusuml.org/di2'; +modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; + + + +transformation Transfo(in src : di2, out target1 : notation, out target2:di); + +main() { + src.rootObjects()->forEach (e|e.oclIsTypeOf(di2::Diagram)) { + e.oclAsType(di2::Diagram).map diagram2diagram(); + }; + + src.rootObjects()![di2::Diagram]->map diagram2SashWindowsMngr(); +} + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/build.properties b/deprecated/org.eclipse.papyrus.conversion.di2todi/build.properties new file mode 100644 index 00000000000..4cc050a6e8a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + TransfoQvtoDi2toDi/ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html new file mode 100644 index 00000000000..140e077f5c9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + +

    +Tutorial

    +

    Converter: Diagram Conversion

    +

    From Papyrus 1 to Papyrus MDT

    +

    +

    Specificities

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Plugin name

    org.eclipse.papyrus.conversion.di2todi

    Papyrus version

    To be used with Papyrus MDT

    Status

    In progress

    (class, composite structure, profile and state diagrams are supported)

    Institution

    CEA LIST

    Authors

    Manel Fredj (initial development), Ansgar Radermacher (clean-up/extensions)

    Required (Papyrus) plugins

    • org.eclipse.papyrus.conversion.di2

    Other Dependencies

      +
    • org.eclipse.m2m.qvt.oml => Install QVT +
    • org.eclipse.ui +
    • org.eclipse.core.runtime +
    • org.eclipse.core.resources +
    • org.eclipse.uml2.uml +
    • org.eclipse.gmf.runtime.notation +
    • org.eclipse.m2m.qvt.oml.emf.util +

    Extensions

      +
    • org.eclipse.m2m.qvt.oml.javaBlackboxUnits +
    • org.eclipse.ui.popupMenus +
    + +

    + +

    User Guide

    + +This plugin enables to convert diagrams created using papyrus 1.X version +into diagram editable by Papyrus MDT. This Tutorial is twofold: + +
      +
    • First, it includes a user guide in order to convert your diagrams (created + with Papyrus 1.X) into diagrams editable by Papyrus MDT + +
    • Second, it includes a developer guide in order to help developers to extend the + conversion to other diagram not already supported. +
    + +

    + +

    How to use the converter?

    + +
      +
    • Add the org.eclipse.papyrus.conversion.di2 + di2todi plugins to your + eclipse configuration. These plugins are provided in the Papyrus SVN + repository under extraplugins/conversion. + +
    • Launch eclipse, including Papyrus MDT. Import your old-version model + created with Papyrus 1.x, let’s call it “Example”. To this aim + you need to import two files: “Example.di2” and “Example.uml”, + as shown in Figure 2. + +
    + +
    +
    + Import Papyrus 1.x Model +
    + +
      +
    • Convert your model. To this aim: + Right click on “Example.di2”> in the menu, select “Convert + Diagram”>then, “Di2 to Di Action”, as shown in Figure 3. +
    + +
    +
    + Convert Your Model +
    + +
      +
    • After processing, a new model is created, compatible with Papyrus MDT. + Indeed, the conversion creates from the di2 file (i.e., Example.di2) + two new files, namely, “Example.notation” and “Example.di”. + The uml file (i.e., Example.uml) is used to make reference to the + uml graphical elements. At the end of the conversion a message + dialog is opened to inform you of the success or the failure of your + conversion. +
    + +
    +
    + Conversion result +
    + +
      +
    • Open the generated di file (i.e., Example.di) to show and edit your + model. +
    + +

    Internal Process of the conversion

    + +This process is performed transparently to user, however, this brief description aims +to provide global overview of the internal process + +

    1st Step

    +As mentioned in the step2, the diagram +converter requires the di2 namespace to be uniquely defined. To this +aim as a first step of the internal process, the converter changed +the namespace in the di2 file from “http://www.papyrusuml.org” to +“http://www.papyrusuml.org/di2”. + + +This step is meant to be transparent to the user, as the converter +restores the di2 namespace to “http://www.papyrusuml.org” +at the end of the conversion, in order to make your diagram editable +by Papyrus 1.x. However, +if the conversion fails before restoring the original name space, the +old-version model may be no more editable by Papyrus 1.x. Hence, the +user may need to restore it manually by editing the di2 file using a +text editor, and removing the “/di2” from the namespace +http://www.papyrusuml.org/di2. + +

    2nd Step

    + +As a second step, the converter transforms elements described in the di2 +file into elements in the notation and di files according to their +respective metamodels. + +The di file contains references to the different diagrams in your model. +The notation file contains a specific description of the elements +that are represented graphically in each diagram: size, coordinates, +nested elements, and so on. +To perform this step, the converter performed a set of QVT +(Query/View/Transform) Operation mappings. + +

    3rd Step

    + +Finally, the converter stores the result of the transformation in to two files, +namely, notation and di file, and restores the di2 namespace to +“http://www.papyrusuml.org”. + +

    Supported Conversions

    + +Herein, we present two sample conversions and outline the elements supported by the converter. We start +first with the class diagram and then, we detail the transformations in the composite diagram. + +

    Class Diagram

    + +Tests have been done with class diagrams containing +
      +
    • Simple classes +
    • Class with operations and attributes +
    • Comments +
    • Relationships between classes +
        +
      • Dependency +
      • Association +
      • Link with a comment +
      • Realization +
      • Generalization +
      +
    + +The screenshots have been taken with an older version that did not copy color attributes. These are now handled. + +
    +
    + Class diagram in Papyrus 1.12 (original) +

    +
    + Class diagram in Papyrus MDT (conversion result) +

    + +

    Composite Diagram

    + +Tests have been done with composite diagrams containing + +
      +
    • Composite classes +
    • Properties within composite classes +
    • Nested classes +
    • Ports +
    • Connection between ports: connector +
    + +
    +
    + Composite diagram in Papyrus 1.12 (original) +

    +
    + Composite diagram in Papyrus MDT (conversion result) +

    + +

    Developer guide

    + +To convert models from Papyrus 1.x to Papyrus MDT, this plugin uses Q/V/T operational mappings. +The plugin contains additional Java code, it is divided into three parts: +
      +
    • Model Transformation libraries implemented in QVTO +
    • Black Boxes implemented in Java and used by the model transformations +
    • Java code that is used to call the model transformations and extend the eclipse + context menu with the conversion action, i.e., "Convert Diagram". +
    + +The main part of the plugin is the model transformation, which includes +
      +
    • General libraries: +
        +
      • ElementType.qvto: names of diagrams in Papyrus 1.12 and MDT. +
      • GeneralMappingsandHelpers.qvto: collection of utilities +
      • NotationQueries.qvto + includes all the queries that are made to the di2 model in order to + be used in the notation model. +
      • Diagram.qvto: convert the supported diagrams, make use of diagram specific + libraries below. +
      • DiTansformation.qvto + enable to create the elements of the di model from the di2 model. +
      + +
    • Diagram specific libraries, prefixed with name of diagram, i.e. <Class>, <Composite>, <State>, + <Profile> and <ClassAndProfile> (the letter is a particular case for edges in class and profile + diagrams which have identical IDs in these two diagram types) +
        +
      • DiagEdge.qvto + that converts all sorts of edges (realization, dependency, + generalization, and so on). +
      • DiagNodes.qvto that converts the node elements of a diagram +
      +
    • The main transformation +
        +
      • Transfo.qvto, which triggers the model transformation. +
      +
    diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png new file mode 100644 index 00000000000..1e1d021cd66 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png new file mode 100644 index 00000000000..5c11cc12e2e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png new file mode 100644 index 00000000000..fe3a0e97514 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png new file mode 100644 index 00000000000..ae6b496d0c8 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png new file mode 100644 index 00000000000..0a61e8d5ae5 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png new file mode 100644 index 00000000000..531381a328e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png new file mode 100644 index 00000000000..726a5582f1b Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png new file mode 100644 index 00000000000..c8112529635 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png new file mode 100644 index 00000000000..8a9e3e5e824 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png differ diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.properties b/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.properties new file mode 100644 index 00000000000..1803ba8aee5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.properties @@ -0,0 +1,12 @@ +################################################################################# +# Copyright (c) 2011 CEA LIST. +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Manel Fredj, Ansgar Radermacher - Initial API and implementation +################################################################################## +pluginName=di2 to di conversion (Papyrus 1.x to Papyrus MDT) +providerName=Eclipse Modeling Project diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.xml b/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.xml new file mode 100644 index 00000000000..484692c3519 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/plugin.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java new file mode 100644 index 00000000000..c660b3cea70 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java @@ -0,0 +1,61 @@ +package org.eclipse.papyrus.conversion.di2todi; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.conversion.di2todi"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java new file mode 100644 index 00000000000..9138b043865 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java @@ -0,0 +1,236 @@ +/** + * @author: Manel Fredj - CEA + * This class includes all the operations that are called in the transformation QVTO from java. + * These operations are wrapped into a black-box + */ + +package org.eclipse.papyrus.conversion.di2todi.blackboxes; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.RelativeBendpoints; +import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; +import org.eclipse.m2m.qvt.oml.blackbox.java.Operation; +import org.eclipse.papyrus.conversion.di2.GraphElement; +import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; +import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.uml2.uml.Association; +import org.eclipse.uml2.uml.Dependency; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.ElementImport; +import org.eclipse.uml2.uml.Generalization; +import org.eclipse.uml2.uml.Realization; + +public class UtilitiesLibrary { + + @Operation(contextual=true) + public static String getName(Diagram self) + { + return self.getName(); + } + + @Operation(contextual=true) + public static EObject convertElement(Element self) + { + return self; + } + + @Operation(contextual=true) + public static String getElementType(Element self) + { + if (self instanceof Association ) + return "Association"; + if (self instanceof Generalization ) + return "Generalization"; + else return null; + } + + @Operation(contextual=true) + public static boolean isGeneralization(Element self) + { + if (self instanceof Generalization) + return true; + else return false; + } + + + @Operation(contextual=true) + public static boolean isAssociation(Element self) + { + if (self instanceof Association) + return true; + else + return false; + } + + @Operation(contextual=true) + public static boolean isRealization(Element self) + { + if (self instanceof Realization) + return true; + else + return false; + } + @Operation(contextual=true) + public static boolean isDependency(Element self) + { + if (self instanceof Dependency) + return true; + else + return false; + } + + @Operation(contextual=true) + public static int dimensionGetWidth(Dimension self) + { + if (self!=null) + return self.width; + else + return 0; + } + + @Operation(contextual=true) + public static int dimensionGetHeight(Dimension self) + { + if (self!=null) + return self.height; + else + return 0; + } + + @Operation(contextual=true) + public static int pointGetX(Point self) + { + if (self!=null) + { + + return self.x; + }else + return 0; + } + + @Operation(contextual=true) + public static int pointGetY(Point self) + { + if (self!=null) + { + return self.y; + } + else + return 0; + } + + @Operation(contextual=true) + public static String showcoordinates(Point self) + { + if (self!=null) + { + return "the x is "+ self.x+ "and the y is "+ self.y; + } + else + return "nothing to display"; + } + + @Operation(contextual=true) + public static int rgb2int(RGB self) + { + if (self!=null) + return self.blue * 0x10000 + self.green *0x100 + self.red; + else + return 0; + } + + @Operation(contextual=true) + public static Element getElement(Uml1SemanticModelBridge bridge) { + // difference to using element attribute directly: getElement will try to resolve proxies + // and thus detects elements referenced by the di2 model that do not exist (anymore) in the + // uml model + Element element = bridge.getElement(); + if ((element != null) && element.eIsProxy()) { + // is still proxy (the getElement implementation of Uml1SemanticModelBridge already tried to + // resolve) => return null + return null; + } + else { + return element; + } + } + + /** + * Return the semantic model for a given di2 element + * @param di2Element existing di2 element + * @return the associated semantic model or null + */ + @Operation(contextual=true) + public static Uml1SemanticModelBridge getSemanticModel(GraphElement di2Element) { + SemanticModelBridge semanticModel; + if (di2Element instanceof org.eclipse.papyrus.conversion.di2.Diagram) { + semanticModel =((org.eclipse.papyrus.conversion.di2.Diagram) di2Element).getOwner(); + } + else { + semanticModel = di2Element.getSemanticModel(); + } + if (semanticModel instanceof Uml1SemanticModelBridge) { + return (Uml1SemanticModelBridge) semanticModel; + } + return null; + } + + @Operation(contextual=true) + public static Element getElement(GraphElement di2Element) { + + Uml1SemanticModelBridge semanticModel = getSemanticModel(di2Element); + if (semanticModel != null) { + return getElement (semanticModel); + } + else { + System.err.println("no bridge found for di2Node" + di2Element); + } + return null; + } + + // may be useful for debugging (use it instead of getElement in combination with a breakpoint) + @Operation(contextual=true) + public static Element getElementDebug(GraphElement di2Element) { + + Element element = getElement(di2Element); + return element; + } + + /** + * Papyrus 1 profile diagrams do not reference meta-class elements directly, but the + * associated element imported + * @param bridge + * @return + */ + @Operation(contextual=true) + public static Element getMetaclassRef(Uml1SemanticModelBridge semanticModel) { + Element element = getElement (semanticModel); + if (element != null) { + if (element instanceof ElementImport) { + return ((ElementImport) element).getImportedElement(); + } + } + else { + System.err.println("no element found"); + } + return element; + } + + public Object createBendpoints() + { + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); + List points = new ArrayList(2); + points.add(new RelativeBendpoint(0,0,0,0)); + points.add(new RelativeBendpoint(0,0,0,0)); + bendpoints.setPoints(points); + return bendpoints; + } +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java new file mode 100644 index 00000000000..2c0729cdeda --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java @@ -0,0 +1,253 @@ +/** + * @author: Manel Fredj - CEA + * This class invoke QVTO transformations that convert a diagram from di2 into di+notation + */ + +package org.eclipse.papyrus.conversion.di2todi.popupactions; + +import java.io.File; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.URIConverter; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.m2m.internal.qvt.oml.ast.env.ModelExtentContents; +import org.eclipse.m2m.internal.qvt.oml.common.MdaException; +import org.eclipse.m2m.internal.qvt.oml.emf.util.ModelContent; +import org.eclipse.m2m.internal.qvt.oml.library.Context; +import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner; +import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner.In; +import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner.Out; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation; +import org.eclipse.m2m.internal.qvt.oml.runtime.project.TransformationUtil; +import org.eclipse.m2m.internal.qvt.oml.trace.Trace; +import org.eclipse.m2m.internal.qvt.oml.trace.TraceRecord; +import org.eclipse.m2m.qvt.oml.util.IContext; +import org.eclipse.papyrus.conversion.di2.util.Di2AdapterFactory; +import org.eclipse.papyrus.conversion.di2todi.Activator; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionDelegate; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; + + +@SuppressWarnings("restriction") +public class Di2toDiAction implements IObjectActionDelegate { + + private static final Map options = null; + private IPath inModelPath; //reference to selected Model + private String inAbsolutepath; + + /** + * Constructor for Action1. + */ + public Di2toDiAction() { + super(); + inModelPath=null; + inAbsolutepath=null; + } + + /** + * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) + */ + public void setActivePart(IAction action, IWorkbenchPart targetPart) { + } + + /** + * @see IActionDelegate#run(IAction) + */ + public void run(IAction action) { + if (adapterFactory == null) { + // dummy operation to force loading/initialization of di2 plugin + adapterFactory = new Di2AdapterFactory(); + } + // Refer to an existing transformation via URI + final URI transformationURI = + URI.createURI("platform:/plugin/" + Activator.PLUGIN_ID + "/TransfoQvtoDi2toDi/Transfo.qvto"); + + //get the resources from the input URI + final ResourceSet resourceSet = new ResourceSetImpl(); + Job job = new Job("Convert diagram " + inModelPath.toString()) { + @Override + protected IStatus run(IProgressMonitor monitor) { + // execute the task ... + + try { + monitor.beginTask("converting ...", 4); + + URI inURI = URI.createPlatformResourceURI(inModelPath.toString(), true); + Resource inResource = resourceSet.getResource(inURI, true); + // create the inputs + List inObjects =inResource.getContents(); + ModelContent input_di2 = new ModelContent (inObjects); + ModelContent[] inputs = new ModelContent[1]; + inputs[0]=input_di2; + + // setup the execution environment details -> context + IContext mycontext = new Context(); + Trace trace= null; + + QvtInterpretedTransformation transformation = new QvtInterpretedTransformation (TransformationUtil.getQvtModule(transformationURI)); + In IntransformationRunner=new TransformationRunner.In(inputs, mycontext); + Out OuttransformationRunner=new TransformationRunner.Out(null,null, null); + + monitor.worked(1); + // running the transformation + OuttransformationRunner=transformation.run(IntransformationRunner); + + // retrieve the outputs + List outputs= OuttransformationRunner.getExtents(); + + // retrieve the trace + trace= OuttransformationRunner.getTrace(); + + if (trace !=null && outputs.size()==2) { + // processing the trace + URI Uri_trace = inURI.trimFileExtension().appendFileExtension("trace"); + EList outObjects_trace = trace.getTraceRecords(); + Resource outResource_trace = resourceSet.createResource(Uri_trace); + outResource_trace.getContents().addAll(outObjects_trace); + + // processing the outputs + ModelExtentContents output_notation = outputs.get(0); + ModelExtentContents output_di = outputs.get(1); + monitor.worked(1); + + URI Uri_notation = inURI.trimFileExtension().appendFileExtension("notation"); + URI Uri_di = inURI.trimFileExtension().appendFileExtension("di"); + + // the output objects got captured in the output extent + List outObjects_notation = output_notation.getAllRootElements(); + List outObjects_di = output_di.getAllRootElements(); + + //Let's persist them using a resource for notation + Resource outResource_notation = resourceSet.createResource(Uri_notation ); + outResource_notation.getContents().addAll(outObjects_notation); + + // let's persist them using a resource for di + Resource outResource_di = resourceSet.createResource(Uri_di); + outResource_di.getContents().addAll(outObjects_di); + + monitor.worked(1); + + try{ + outResource_notation.save(Collections.emptyMap()); + outResource_di.save(Collections.emptyMap()); + outResource_trace.save(Collections.emptyMap()); + } + catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + monitor.worked(1); + + // remove trace file + URIConverter uri= resourceSet.getURIConverter(); + uri.delete(Uri_trace, options); + } + } + catch (final MdaException e) { + Display.getDefault().syncExec(new Runnable() { + public void run() { + MessageDialog.openError( + new Shell(), "Model transformation error during conversion", e.toString ()); + } + }); + e.printStackTrace(); + } + catch (final IOException e) { + Display.getDefault().syncExec(new Runnable() { + public void run() { + MessageDialog.openError( + new Shell(), "IO error during conversion", e.toString ()); + } + }); + e.printStackTrace(); + } + catch (final RuntimeException e) { + Display.getDefault().syncExec(new Runnable() { + public void run() { + MessageDialog.openError( + new Shell(), "Error during conversion", e.toString ()); + } + }); + e.printStackTrace (); + } + finally { + // when the transformation succeeds + //1- restore the content of Di2 file i.e., di2 namespace + PapyrusNamespace.restoreDi2Namespace(inAbsolutepath); + } + + monitor.done(); + return Status.OK_STATUS; + } + }; + job.setUser (true); + job.schedule (); + } + + /** + * @see IActionDelegate#selectionChanged(IAction, ISelection) + */ + public void selectionChanged(IAction action, ISelection selection) + { + this.inModelPath = null; + + if (!(selection instanceof IStructuredSelection)) { + // no structured-selection + return; + } + IStructuredSelection structuredSelection = (IStructuredSelection) selection; + if (selection.isEmpty()) { + return; + } + + Object firstElement = structuredSelection.getFirstElement(); + + if (firstElement instanceof IFile) { + + IFile di2Select = (IFile) firstElement; + // retrieve the path of the file + IPath di2Path = di2Select.getFullPath(); + IPath location = di2Select.getLocation(); + if (location != null) { + // Get the file for the location + File file = location.toFile(); + if (file != null) { + // Add the absolute path to the list + this.inAbsolutepath = file.getAbsolutePath(); + } + + // check whether it is a .di2 file + String di2filename = di2Path.toString(); + if (di2filename.endsWith (".di2")) { + // change namespace of di2 + PapyrusNamespace.replaceNamespace(this.inAbsolutepath); + this.inModelPath = di2Path; + } + } + } + } + + Di2AdapterFactory adapterFactory = null; +} + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java new file mode 100644 index 00000000000..5a17df64ff2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java @@ -0,0 +1,80 @@ +/** + * @author: Manel Fredj - CEA + * This class enables to change the namespace of di2 metamodel from + * replace http://www.papyrusuml.org into http://www.papyrusuml.org/di2 + */ + +package org.eclipse.papyrus.conversion.di2todi.popupactions; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.IOException; + +public class PapyrusNamespace +{ + ///////////////////////////////////////////////////////////////////////////////////////////// + //replace http://www.papyrusuml.org -- by -- http://www.papyrusuml.org/di2 + + public static void replaceNamespace(String absolutepath) + { + try { + String oldNameSpace = "di2=\"http://www.papyrusuml.org\""; + String newNameSpace="di2=\"http://www.papyrusuml.org/di2\""; + String oldtext =readFileAsString(absolutepath); + // replace the namespace in the di2 file + String newtext = oldtext.replaceAll (oldNameSpace, newNameSpace); + + FileWriter writer = new FileWriter(absolutepath); + writer.write(newtext);writer.close(); + } + catch (IOException ioe) { + ioe.printStackTrace(); + } + } + + public static void restoreDi2Namespace(String absolutepath) + { + try { + String oldNameSpace="di2=\"http://www.papyrusuml.org/di2\""; + String newNameSpace = "di2=\"http://www.papyrusuml.org\""; + + String oldtext =readFileAsString(absolutepath); + // replace the namespace in the di2 file + String newtext = oldtext.replaceAll (oldNameSpace, newNameSpace); + + FileWriter writer = new FileWriter(absolutepath); + writer.write(newtext);writer.close(); + } + catch (IOException ioe) { + ioe.printStackTrace(); + } + } + + /** + * @param filePath the name of the file to open. Not sure if it can accept + * cccURLs or just filenames. Path handling could be better, and buffer + * sizes are hardcoded + */ + private static String readFileAsString (String filePath) + throws java.io.IOException + { + byte[] buffer = new byte[(int) new File(filePath).length()]; + BufferedInputStream f = null; + try { + f = new BufferedInputStream(new FileInputStream(filePath)); + f.read(buffer); + } + finally { + if (f != null) { + try { + f.close(); + } + catch (IOException ignored) { + } + } + } + return new String(buffer); + } +} diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/toc.xml b/deprecated/org.eclipse.papyrus.conversion.di2todi/toc.xml new file mode 100644 index 00000000000..3057fc280ee --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/toc.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.conversion.di2todi/tocdev.xml b/deprecated/org.eclipse.papyrus.conversion.di2todi/tocdev.xml new file mode 100644 index 00000000000..53009154565 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.conversion.di2todi/tocdev.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/.project b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/.project deleted file mode 100644 index d2f295e1a2a..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.papyrus.conversion-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/build.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/build.properties deleted file mode 100644 index 9c864246773..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - eclipse_update_120.jpg,\ - epl-v10.html,\ - license.html diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg deleted file mode 100644 index bfdf708ad61..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/eclipse_update_120.jpg and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/epl-v10.html b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/epl-v10.html deleted file mode 100644 index cb1073a4bad..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/epl-v10.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - -Eclipse Public License - Version 1.0 - - - - - -
    - -

    Eclipse Public License - v 1.0 -

    - -

    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER -THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, -REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE -OF THIS AGREEMENT.

    - -

    1. DEFINITIONS

    - -

    "Contribution" means:

    - -

    a) -in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and
    -b) in the case of each subsequent Contributor:

    - -

    i) -changes to the Program, and

    - -

    ii) -additions to the Program;

    - -

    where -such changes and/or additions to the Program originate from and are distributed -by that particular Contributor. A Contribution 'originates' from a Contributor -if it was added to the Program by such Contributor itself or anyone acting on -such Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in conjunction -with the Program under their own license agreement, and (ii) are not derivative -works of the Program.

    - -

    "Contributor" means any person or -entity that distributes the Program.

    - -

    "Licensed Patents " mean patent -claims licensable by a Contributor which are necessarily infringed by the use -or sale of its Contribution alone or when combined with the Program.

    - -

    "Program" means the Contributions -distributed in accordance with this Agreement.

    - -

    "Recipient" means anyone who -receives the Program under this Agreement, including all Contributors.

    - -

    2. GRANT OF RIGHTS

    - -

    a) -Subject to the terms of this Agreement, each Contributor hereby grants Recipient -a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly -display, publicly perform, distribute and sublicense the Contribution of such -Contributor, if any, and such derivative works, in source code and object code -form.

    - -

    b) -Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free -patent license under Licensed Patents to make, use, sell, offer to sell, import -and otherwise transfer the Contribution of such Contributor, if any, in source -code and object code form. This patent license shall apply to the combination -of the Contribution and the Program if, at the time the Contribution is added -by the Contributor, such addition of the Contribution causes such combination -to be covered by the Licensed Patents. The patent license shall not apply to -any other combinations which include the Contribution. No hardware per se is -licensed hereunder.

    - -

    c) -Recipient understands that although each Contributor grants the licenses to its -Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program.

    - -

    d) -Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in -this Agreement.

    - -

    3. REQUIREMENTS

    - -

    A Contributor may choose to distribute the -Program in object code form under its own license agreement, provided that: -

    - -

    a) -it complies with the terms and conditions of this Agreement; and

    - -

    b) -its license agreement:

    - -

    i) -effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose;

    - -

    ii) -effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, such -as lost profits;

    - -

    iii) -states that any provisions which differ from this Agreement are offered by that -Contributor alone and not by any other party; and

    - -

    iv) -states that source code for the Program is available from such Contributor, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange.

    - -

    When the Program is made available in source -code form:

    - -

    a) -it must be made available under this Agreement; and

    - -

    b) a -copy of this Agreement must be included with each copy of the Program.

    - -

    Contributors may not remove or alter any -copyright notices contained within the Program.

    - -

    Each Contributor must identify itself as the -originator of its Contribution, if any, in a manner that reasonably allows -subsequent Recipients to identify the originator of the Contribution.

    - -

    4. COMMERCIAL DISTRIBUTION

    - -

    Commercial distributors of software may -accept certain responsibilities with respect to end users, business partners -and the like. While this license is intended to facilitate the commercial use -of the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create potential -liability for other Contributors. Therefore, if a Contributor includes the -Program in a commercial product offering, such Contributor ("Commercial -Contributor") hereby agrees to defend and indemnify every other -Contributor ("Indemnified Contributor") against any losses, damages and -costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense and -any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense.

    - -

    For example, a Contributor might include the -Program in a commercial product offering, Product X. That Contributor is then a -Commercial Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under this -section, the Commercial Contributor would have to defend claims against the -other Contributors related to those performance claims and warranties, and if a -court requires any other Contributor to pay any damages as a result, the -Commercial Contributor must pay those damages.

    - -

    5. NO WARRANTY

    - -

    EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, -WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely -responsible for determining the appropriateness of using and distributing the -Program and assumes all risks associated with its exercise of rights under this -Agreement , including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations.

    - -

    6. DISCLAIMER OF LIABILITY

    - -

    EXCEPT AS EXPRESSLY SET FORTH IN THIS -AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF -THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGES.

    - -

    7. GENERAL

    - -

    If any provision of this Agreement is invalid -or unenforceable under applicable law, it shall not affect the validity or -enforceability of the remainder of the terms of this Agreement, and without -further action by the parties hereto, such provision shall be reformed to the -minimum extent necessary to make such provision valid and enforceable.

    - -

    If Recipient institutes patent litigation -against any entity (including a cross-claim or counterclaim in a lawsuit) -alleging that the Program itself (excluding combinations of the Program with -other software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the date -such litigation is filed.

    - -

    All Recipient's rights under this Agreement -shall terminate if it fails to comply with any of the material terms or -conditions of this Agreement and does not cure such failure in a reasonable -period of time after becoming aware of such noncompliance. If all Recipient's -rights under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive.

    - -

    Everyone is permitted to copy and distribute -copies of this Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The Agreement -Steward reserves the right to publish new versions (including revisions) of -this Agreement from time to time. No one other than the Agreement Steward has -the right to modify this Agreement. The Eclipse Foundation is the initial -Agreement Steward. The Eclipse Foundation may assign the responsibility to -serve as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The Program -(including Contributions) may always be distributed subject to the version of -the Agreement under which it was received. In addition, after a new version of -the Agreement is published, Contributor may elect to distribute the Program -(including its Contributions) under the new version. Except as expressly stated -in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to -the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program not -expressly granted under this Agreement are reserved.

    - -

    This Agreement is governed by the laws of the -State of New York and the intellectual property laws of the United States of -America. No party to this Agreement will bring a legal action under this -Agreement more than one year after the cause of action arose. Each party waives -its rights to a jury trial in any resulting litigation.

    - -

    - -
    - - - - \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.properties deleted file mode 100644 index 7e8977d5850..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.properties +++ /dev/null @@ -1,145 +0,0 @@ -# NLS_MESSAGEFORMAT_VAR - -# "featureName" property - name of the feature -featureName=MARTE profile (Incubation) - -# "providerName" property - name of the company that provides the feature -providerName=Eclipse Modeling Project - -# "description" property - description of the feature -description=Contains a diagram converter from Papyrus 1.x to Papyrus MDT - -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=license.html - -# "license" property - text of the "Feature Update License" -# should be plain text version of license agreement pointed to be "licenseURL" -license=\ -Eclipse Foundation Software User Agreement\n\ -April 14, 2010\n\ -\n\ -Usage Of Content\n\ -\n\ -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ -OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ -USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ -AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ -NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ -AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ -AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ -OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ -TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ -BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ -\n\ -Applicable Licenses\n\ -\n\ -Unless otherwise indicated, all Content made available by the\n\ -Eclipse Foundation is provided to you under the terms and conditions of\n\ -the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ -provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ -For purposes of the EPL, "Program" will mean the Content.\n\ -\n\ -Content includes, but is not limited to, source code, object code,\n\ -documentation and other files maintained in the Eclipse Foundation source code\n\ -repository ("Repository") in software modules ("Modules") and made available\n\ -as downloadable archives ("Downloads").\n\ -\n\ - - Content may be structured and packaged into modules to facilitate delivering,\n\ - extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ - plug-in fragments ("Fragments"), and features ("Features").\n\ - - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ - in a directory named "plugins".\n\ - - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ - Each Feature may be packaged as a sub-directory in a directory named "features".\n\ - Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ - numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ - - Features may also include other Features ("Included Features"). Within a Feature, files\n\ - named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ -\n\ -The terms and conditions governing Plug-ins and Fragments should be\n\ -contained in files named "about.html" ("Abouts"). The terms and\n\ -conditions governing Features and Included Features should be contained\n\ -in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ -Licenses may be located in any directory of a Download or Module\n\ -including, but not limited to the following locations:\n\ -\n\ - - The top-level (root) directory\n\ - - Plug-in and Fragment directories\n\ - - Inside Plug-ins and Fragments packaged as JARs\n\ - - Sub-directories of the directory named "src" of certain Plug-ins\n\ - - Feature directories\n\ -\n\ -Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ -Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ -Update License") during the installation process. If the Feature contains\n\ -Included Features, the Feature Update License should either provide you\n\ -with the terms and conditions governing the Included Features or inform\n\ -you where you can locate them. Feature Update Licenses may be found in\n\ -the "license" property of files named "feature.properties" found within a Feature.\n\ -Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ -terms and conditions (or references to such terms and conditions) that\n\ -govern your use of the associated Content in that directory.\n\ -\n\ -THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ -TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ -SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ -\n\ - - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ - - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ - - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ - - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ - - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ -\n\ -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ -TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ -is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ -govern that particular Content.\n\ -\n\ -\n\Use of Provisioning Technology\n\ -\n\ -The Eclipse Foundation makes available provisioning software, examples of which include,\n\ -but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ -the purpose of allowing users to install software, documentation, information and/or\n\ -other materials (collectively "Installable Software"). This capability is provided with\n\ -the intent of allowing such users to install, extend and update Eclipse-based products.\n\ -Information about packaging Installable Software is available at\n\ -http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ -\n\ -You may use Provisioning Technology to allow other parties to install Installable Software.\n\ -You shall be responsible for enabling the applicable license agreements relating to the\n\ -Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ -in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ -making it available in accordance with the Specification, you further acknowledge your\n\ -agreement to, and the acquisition of all necessary rights to permit the following:\n\ -\n\ - 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ - the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ - extending or updating the functionality of an Eclipse-based product.\n\ - 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ - Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ - 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ - govern the use of the Installable Software ("Installable Software Agreement") and such\n\ - Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ - with the Specification. Such Installable Software Agreement must inform the user of the\n\ - terms and conditions that govern the Installable Software and must solicit acceptance by\n\ - the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ - indication of agreement by the user, the provisioning Technology will complete installation\n\ - of the Installable Software.\n\ -\n\ -Cryptography\n\ -\n\ -Content may contain encryption software. The country in which you are\n\ -currently may have restrictions on the import, possession, and use,\n\ -and/or re-export to another country, of encryption software. BEFORE\n\ -using any encryption software, please check the country's laws,\n\ -regulations and policies concerning the import, possession, or use, and\n\ -re-export of encryption software, to see if this is permitted.\n\ -\n\ -Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n -########### end of license property ########################################## - - -# "UpdateSiteName" property - label for the update site (on download1.eclipse.org) -PapyrusUpdateSiteName=MDT Papyrus Extra Updates - Nightly builds diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.xml b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.xml deleted file mode 100644 index ad450331f44..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/feature.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - This feature includes an implementation of a diagram converter -from Papyrus 1.x to Papyrus MDT. - - - - Copyright (c) 2008-2011 CEA LIST -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 -http://www.eclipse.org/legal/epl-v10.html - - - - %license - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/license.html b/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/license.html deleted file mode 100644 index a9b560f44cd..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion-feature/license.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Eclipse.org Software User Agreement - - - -

    Eclipse Foundation Software User Agreement

    -

    March 17, 2005

    - -

    Usage Of Content

    - -

    THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS - (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND - CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE - OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR - NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND - CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

    - -

    Applicable Licenses

    - -

    Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 - ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. - For purposes of the EPL, "Program" will mean the Content.

    - -

    Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS - modules ("Modules") and made available as downloadable archives ("Downloads").

    - -
      -
    • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
    • -
    • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
    • -
    • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins - and/or Fragments associated with that Feature.
    • -
    • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
    • -
    - -

    The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and -Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module -including, but not limited to the following locations:

    - -
      -
    • The top-level (root) directory
    • -
    • Plug-in and Fragment directories
    • -
    • Inside Plug-ins and Fragments packaged as JARs
    • -
    • Sub-directories of the directory named "src" of certain Plug-ins
    • -
    • Feature directories
    • -
    - -

    Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the -installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or -inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. -Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in -that directory.

    - -

    THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE -OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

    - - - -

    IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please -contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

    - -

    Cryptography

    - -

    Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to - another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, - possession, or use, and re-export of encryption software, to see if this is permitted.

    - -Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.classpath b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.classpath deleted file mode 100644 index aad3b0bc0eb..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.project b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.project deleted file mode 100644 index fd7cb505981..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - org.eclipse.papyrus.conversion.di2 - - - - - - com.ibm.etools.common.migration.MigrationBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF deleted file mode 100644 index 8443b2db054..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.papyrus.conversion.di2;singleton:=true -Bundle-Version: 0.8.0.qualifier -Bundle-ClassPath: . -Bundle-Vendor: %pluginProvider -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Export-Package: org.eclipse.papyrus.conversion.di2, - org.eclipse.papyrus.conversion.di2.impl, - org.eclipse.papyrus.conversion.di2.util -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.uml2.types;visibility:=reexport, - org.eclipse.gef, - org.eclipse.uml2.uml -Bundle-ActivationPolicy: lazy -Eclipse-LazyStart: true diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/build.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/build.properties deleted file mode 100644 index 9945044204e..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/build.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# -# -# $Id$ - -bin.includes = .,\ - model/,\ - META-INF/,\ - plugin.xml,\ - plugin.properties -jars.compile.order = . -source.. = src/,\ - customsrc/ -output.. = bin/ -src.includes = src/,\ - plugin.xml,\ - plugin.properties,\ - model/,\ - build.properties,\ - META-INF/,\ - .project,\ - .classpath diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java deleted file mode 100644 index c48f281f5b9..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/customsrc/org/eclipse/papyrus/conversion/di2/DiConstants.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.eclipse.papyrus.conversion.di2; - -/** constant for DI2 **/ -public interface DiConstants { - - /** constant for Type diagram **/ - public final String CLASS_DIAGRAM = "ClassDiagram"; - - public final String COMPOSITE_STRUCTURE_DIAGRAM = "CompositeStructureDiagram"; - - public final String COMPONENT_DIAGRAM = "ComponentDiagram"; - - public final String DEPLOYMENT_DIAGRAM = "DeploymentDiagram"; - - public final String OBJECT_DIAGRAM = "ObjectDiagram"; - - public final String PACKAGE_DIAGRAM = "PackageDiagram"; - - public final String ACTIVITY_DIAGRAM = "ActivityDiagram"; - - public final String SEQUENCE_DIAGRAM = "SequenceDiagram"; - - public final String COMMUNICATION_DIAGRAM = "CommunicationDiagram"; - - public final String INTERACTION_OVERVIEW_DIAGRAM = "InteractionOverviewDiagram"; - - public final String TIMING_DIAGRAM = "TimingDiagram"; - - public final String USE_CASE_DIAGRAM = "UseCaseDiagram"; - - public final String STATE_MACHINE_DIAGRAM = "StateMachineDiagram"; - -} diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel deleted file mode 100644 index c0b6c84e8c9..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/OLDdi2.genmodel +++ /dev/null @@ -1,115 +0,0 @@ - - - di2.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/UML.ecore b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/UML.ecore deleted file mode 100644 index 7206ff84e61..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/UML.ecore +++ /dev/null @@ -1,10032 +0,0 @@ - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - -
    - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - - - - - - - - - - - - - -
    - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - - - -
    - - - - - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - - - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - - - - -
    - - - - - - - - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - - - -
    - - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - -
    - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - -
    - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - - - - - - -
    - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - - - -
    - - - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - - -
    - - - - - - - - -
    - - - - - -
    - - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - - - -
    - - - -
    - - - - - - - -
    - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - - -
    - - - -
    - - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - - - - - - - - - - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - - -
    - - -
    - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - - -
    - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - -
    - - - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - - -
    - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - - - -
    - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - -
    - - - - - - -
    - - - - - - -
    - - - - - - -
    - - - - - -
    - - - - -
    - - - - - - -
    - - - -
    - - - - - - -
    - - -
    - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore deleted file mode 100644 index 0e2ecdd82a4..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2-master.ecore +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.ecore b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.ecore deleted file mode 100644 index cebea7ea7c3..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.ecore +++ /dev/null @@ -1,172 +0,0 @@ - - - - - -
    - - - - - -
    - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - -
    - - - - - -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.genmodel b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.genmodel deleted file mode 100644 index a5b082c3462..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2.genmodel +++ /dev/null @@ -1,125 +0,0 @@ - - - di2.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore deleted file mode 100644 index 1dd61696f84..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/di2withoutUMLEcore.ecore +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/note.txt b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/note.txt deleted file mode 100644 index 7b2c4715872..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/model/note.txt +++ /dev/null @@ -1,132 +0,0 @@ - - /** - * - * - * @generated NOT - */ - public Point createPointFromString(EDataType eDataType, String initialValue) { - //return (Point)super.createFromString(eDataType, initialValue); - if (initialValue == null) return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); - return new Point(new Double(st.nextToken()).doubleValue(),new Double(st.nextToken()).doubleValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertPointToString(EDataType eDataType, Object instanceValue) { - //return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) return null; - - return ""+ ((Point) (instanceValue)).x+":"+((Point) (instanceValue)).y; - - } - - /** - * - * - * @generated NOT - */ - public Dimension createDimensionFromString(EDataType eDataType, String initialValue) { - //return (Dimension)super.createFromString(eDataType, initialValue); - if (initialValue == null) return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); - return new Dimension(new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertDimensionToString(EDataType eDataType, Object instanceValue) { - //return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) return null; - - return ""+ ((Dimension) (instanceValue)).width+":"+((Dimension) (instanceValue)).height; - } - - /** - * - * - * @generated NOT - */ - public RGB createRGBFromString(EDataType eDataType, String initialValue) { - //return (RGB)super.createFromString(eDataType, initialValue); - if (initialValue == null) return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue,":"); - return new RGB(new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue(),new Integer(st.nextToken()).intValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertRGBToString(EDataType eDataType, Object instanceValue) { - //return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) return null; - - return ""+ ((RGB) (instanceValue)).red+":"+((RGB) (instanceValue)).green+":"+((RGB) (instanceValue)).blue; - } - - - - ////////////////// - //getType of Diagram - ///////////////////// - /** - * - * - * @NOT generated - */ - public String getType() { - if (this.type.equals("") ||this.type==null){ - return "ClassDiagram"; - } - return this.type; - } - - - /////////////////////////////////////////////////////////////////////////// - // Diagram Image.... - /////////////////////////////////////////////////////////////////////////// - /** - * This returns Diagram.gif. - * - * TODO code modified by RS for specific diagram display in di2.edit -> DiagramItemProvider - * - */ - @Override - public Object getImage(Object object) { - String typeDiagram = ((Diagram)object).getType(); - if(typeDiagram == null) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram")); - } - if( typeDiagram.equals("ActivityDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_ActivityDiagram")); - } - if( typeDiagram.equals("ClassDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_ClassDiagram")); - } - if( typeDiagram.equals("CompositeStructureDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_CompositeStructureDiagram")); - } - if( typeDiagram.equals("DeploymentDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_DeploymentDiagram")); - } - if( typeDiagram.equals("StateMachineDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_StateMachineDiagram")); - } - if( typeDiagram.equals("UseCaseDiagram")){ - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram_UseCaseDiagram")); - } - - return overlayImage(object, getResourceLocator().getImage("full/obj16/Diagram")); - - } - - - \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.properties deleted file mode 100644 index cbf2f0234f4..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################# -# Copyright (c) 2011 CEA LIST. -# 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Manel Fredj, Ansgar Radermacher - Initial API and implementation -################################################################################## -pluginName=Di2 model code -providerName=Eclipse Modeling Project - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.xml b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.xml deleted file mode 100644 index ca7c3c3889a..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/plugin.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java deleted file mode 100644 index 97a55bc19fb..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/CoreSemanticModelBridge.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object ' - * Core Semantic Model Bridge'. - * - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getCoreSemanticModelBridge() - * @model - * @generated - */ -public interface CoreSemanticModelBridge extends SemanticModelBridge { -} // CoreSemanticModelBridge diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java deleted file mode 100644 index 54c5e09e7a0..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Factory.java +++ /dev/null @@ -1,205 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.emf.ecore.EFactory; - -/** - * The Factory for the model. It provides a create method for each - * non-abstract class of the model. - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package - * @generated - */ -public interface Di2Factory extends EFactory { - - /** - * The singleton instance of the factory. - * - * @generated - */ - Di2Factory eINSTANCE = org.eclipse.papyrus.conversion.di2.impl.Di2FactoryImpl.init(); - - /** - * Returns a new object of class 'Diagram Element'. - * - * @return a new object of class 'Diagram Element'. - * @generated - */ - DiagramElement createDiagramElement(); - - /** - * Returns a new object of class 'Graph Element'. - * - * @return a new object of class 'Graph Element'. - * @generated - */ - GraphElement createGraphElement(); - - /** - * Returns a new object of class 'Reference'. - * - * @return a new object of class 'Reference'. - * @generated - */ - Reference createReference(); - - /** - * Returns a new object of class 'Property'. - * - * @return a new object of class 'Property'. - * @generated - */ - Property createProperty(); - - /** - * Returns a new object of class 'Graph Edge'. - * - * @return a new object of class 'Graph Edge'. - * @generated - */ - GraphEdge createGraphEdge(); - - /** - * Returns a new object of class 'Graph Connector'. - * - * @return a new object of class 'Graph Connector'. - * @generated - */ - GraphConnector createGraphConnector(); - - /** - * Returns a new object of class 'Graph Node'. - * - * @return a new object of class 'Graph Node'. - * @generated - */ - GraphNode createGraphNode(); - - /** - * Returns a new object of class 'Diagram Link'. - * - * @return a new object of class 'Diagram Link'. - * @generated - */ - DiagramLink createDiagramLink(); - - /** - * Returns a new object of class 'Diagram'. - * - * @return a new object of class 'Diagram'. - * @generated - */ - Diagram createDiagram(); - - /** - * Returns a new object of class 'Semantic Model Bridge'. - * - * @return a new object of class 'Semantic Model Bridge'. - * @generated - */ - SemanticModelBridge createSemanticModelBridge(); - - /** - * Returns a new object of class 'Simple Semantic Model Element'. - * - * @return a new object of class 'Simple Semantic Model Element'. - * @generated - */ - SimpleSemanticModelElement createSimpleSemanticModelElement(); - - /** - * Returns a new object of class 'Uml1 Semantic Model Bridge'. - * - * - * @return a new object of class 'Uml1 Semantic Model Bridge'. - * @generated - */ - Uml1SemanticModelBridge createUml1SemanticModelBridge(); - - /** - * Returns a new object of class 'Core Semantic Model Bridge'. - * - * - * @return a new object of class 'Core Semantic Model Bridge'. - * @generated - */ - CoreSemanticModelBridge createCoreSemanticModelBridge(); - - /** - * Returns a new object of class 'Leaf Element'. - * - * @return a new object of class 'Leaf Element'. - * @generated - */ - LeafElement createLeafElement(); - - /** - * Returns a new object of class 'Text Element'. - * - * @return a new object of class 'Text Element'. - * @generated - */ - TextElement createTextElement(); - - /** - * Returns a new object of class 'Image'. - * - * @return a new object of class 'Image'. - * @generated - */ - Image createImage(); - - /** - * Returns a new object of class 'Graphic Primitive'. - * - * @return a new object of class 'Graphic Primitive'. - * @generated - */ - GraphicPrimitive createGraphicPrimitive(); - - /** - * Returns a new object of class 'Polilyne'. - * - * @return a new object of class 'Polilyne'. - * @generated - */ - Polilyne createPolilyne(); - - /** - * Returns a new object of class 'Ellipse'. - * - * @return a new object of class 'Ellipse'. - * @generated - */ - Ellipse createEllipse(); - - /** - * Returns the package supported by this factory. - * - * @return the package supported by this factory. - * @generated - */ - Di2Package getDi2Package(); - -} // Di2Factory diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java deleted file mode 100644 index a92a4a0fe6c..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Di2Package.java +++ /dev/null @@ -1,4337 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * The Package for the model. It contains accessors for the meta - * objects to represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * - * @see org.eclipse.papyrus.conversion.di2.Di2Factory - * @model kind="package" - * @generated - */ -public interface Di2Package extends EPackage { - - /** - * The package name. - * - * @generated - */ - String eNAME = "di2"; - - /** - * The package namespace URI. - * - * @generated - */ - String eNS_URI = "http://www.papyrusuml.org/di2"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "di2"; - - /** - * The singleton instance of the package. - * - * @generated - */ - Di2Package eINSTANCE = org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl.init(); - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl - * Diagram Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramElement() - * @generated - */ - int DIAGRAM_ELEMENT = 0; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__PROPERTY = 0; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__IS_VISIBLE = 1; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__REFERENCE = 2; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__CONTAINER = 3; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__FONT_FAMILY = 4; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__FONT_SIZE = 5; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__LINE_STYLE = 6; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__LINE_THICKNESS = 7; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__FONT_COLOR = 8; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__FOREGROUND_COLOR = 9; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__BACKGROUND_COLOR = 10; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__BORDER_COLOR = 11; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__TRANSLUCENT = 12; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__SEMANTIC_PARENT = 13; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT__SEMANTIC_CHILD = 14; - - /** - * The number of structural features of the 'Diagram Element' class. - * - * @generated - * @ordered - */ - int DIAGRAM_ELEMENT_FEATURE_COUNT = 15; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl Graph Element}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphElement() - * @generated - */ - int GRAPH_ELEMENT = 1; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Contained' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__CONTAINED = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Link' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__LINK = DIAGRAM_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Semantic Model' containment reference. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__SEMANTIC_MODEL = DIAGRAM_ELEMENT_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Position' attribute. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__POSITION = DIAGRAM_ELEMENT_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Anchorage' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT__ANCHORAGE = DIAGRAM_ELEMENT_FEATURE_COUNT + 4; - - /** - * The number of structural features of the 'Graph Element' class. - * - * @generated - * @ordered - */ - int GRAPH_ELEMENT_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 5; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl Reference}' class. - * - * - * @see org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getReference() - * @generated - */ - int REFERENCE = 2; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int REFERENCE__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int REFERENCE__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int REFERENCE__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int REFERENCE__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int REFERENCE__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int REFERENCE__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int REFERENCE__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int REFERENCE__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Is Individual Representation' attribute. - * - * @generated - * @ordered - */ - int REFERENCE__IS_INDIVIDUAL_REPRESENTATION = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Referenced' reference. - * - * @generated - * @ordered - */ - int REFERENCE__REFERENCED = DIAGRAM_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Reference' class. - * - * - * @generated - * @ordered - */ - int REFERENCE_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl - * Property}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.PropertyImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getProperty() - * @generated - */ - int PROPERTY = 3; - - /** - * The feature id for the 'Key' attribute. - * - * @generated - * @ordered - */ - int PROPERTY__KEY = 0; - - /** - * The feature id for the 'Value' attribute. - * - * @generated - * @ordered - */ - int PROPERTY__VALUE = 1; - - /** - * The number of structural features of the 'Property' class. - * - * - * @generated - * @ordered - */ - int PROPERTY_FEATURE_COUNT = 2; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl Graph Edge}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphEdge() - * @generated - */ - int GRAPH_EDGE = 4; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__PROPERTY = GRAPH_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__IS_VISIBLE = GRAPH_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__REFERENCE = GRAPH_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__CONTAINER = GRAPH_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__FONT_FAMILY = GRAPH_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__FONT_SIZE = GRAPH_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__LINE_STYLE = GRAPH_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__LINE_THICKNESS = GRAPH_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__FONT_COLOR = GRAPH_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__FOREGROUND_COLOR = GRAPH_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__BACKGROUND_COLOR = GRAPH_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__BORDER_COLOR = GRAPH_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__TRANSLUCENT = GRAPH_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__SEMANTIC_PARENT = GRAPH_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__SEMANTIC_CHILD = GRAPH_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Contained' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__CONTAINED = GRAPH_ELEMENT__CONTAINED; - - /** - * The feature id for the 'Link' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__LINK = GRAPH_ELEMENT__LINK; - - /** - * The feature id for the 'Semantic Model' containment reference. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__SEMANTIC_MODEL = GRAPH_ELEMENT__SEMANTIC_MODEL; - - /** - * The feature id for the 'Position' attribute. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__POSITION = GRAPH_ELEMENT__POSITION; - - /** - * The feature id for the 'Anchorage' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__ANCHORAGE = GRAPH_ELEMENT__ANCHORAGE; - - /** - * The feature id for the 'Anchor' reference list. - * - * @generated - * @ordered - */ - int GRAPH_EDGE__ANCHOR = GRAPH_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Waypoints' attribute list. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE__WAYPOINTS = GRAPH_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Graph Edge' class. - * - * - * @generated - * @ordered - */ - int GRAPH_EDGE_FEATURE_COUNT = GRAPH_ELEMENT_FEATURE_COUNT + 2; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl - * Graph Connector}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphConnector() - * @generated - */ - int GRAPH_CONNECTOR = 5; - - /** - * The feature id for the 'Position' attribute. - * - * @generated - * @ordered - */ - int GRAPH_CONNECTOR__POSITION = 0; - - /** - * The feature id for the 'Graph Edge' reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_CONNECTOR__GRAPH_EDGE = 1; - - /** - * The feature id for the 'Graph Element' container reference. - * - * @generated - * @ordered - */ - int GRAPH_CONNECTOR__GRAPH_ELEMENT = 2; - - /** - * The number of structural features of the 'Graph Connector' class. - * - * @generated - * @ordered - */ - int GRAPH_CONNECTOR_FEATURE_COUNT = 3; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl Graph Node}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphNode() - * @generated - */ - int GRAPH_NODE = 6; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_NODE__PROPERTY = GRAPH_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__IS_VISIBLE = GRAPH_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE__REFERENCE = GRAPH_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int GRAPH_NODE__CONTAINER = GRAPH_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__FONT_FAMILY = GRAPH_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__FONT_SIZE = GRAPH_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__LINE_STYLE = GRAPH_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE__LINE_THICKNESS = GRAPH_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__FONT_COLOR = GRAPH_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE__FOREGROUND_COLOR = GRAPH_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE__BACKGROUND_COLOR = GRAPH_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__BORDER_COLOR = GRAPH_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__TRANSLUCENT = GRAPH_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE__SEMANTIC_PARENT = GRAPH_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int GRAPH_NODE__SEMANTIC_CHILD = GRAPH_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Contained' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_NODE__CONTAINED = GRAPH_ELEMENT__CONTAINED; - - /** - * The feature id for the 'Link' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_NODE__LINK = GRAPH_ELEMENT__LINK; - - /** - * The feature id for the 'Semantic Model' containment reference. - * - * @generated - * @ordered - */ - int GRAPH_NODE__SEMANTIC_MODEL = GRAPH_ELEMENT__SEMANTIC_MODEL; - - /** - * The feature id for the 'Position' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__POSITION = GRAPH_ELEMENT__POSITION; - - /** - * The feature id for the 'Anchorage' containment reference list. - * - * @generated - * @ordered - */ - int GRAPH_NODE__ANCHORAGE = GRAPH_ELEMENT__ANCHORAGE; - - /** - * The feature id for the 'Size' attribute. - * - * @generated - * @ordered - */ - int GRAPH_NODE__SIZE = GRAPH_ELEMENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Graph Node' class. - * - * - * @generated - * @ordered - */ - int GRAPH_NODE_FEATURE_COUNT = GRAPH_ELEMENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl Diagram Link}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramLink() - * @generated - */ - int DIAGRAM_LINK = 7; - - /** - * The feature id for the 'Diagram' reference. - * - * @generated - * @ordered - */ - int DIAGRAM_LINK__DIAGRAM = 0; - - /** - * The feature id for the 'Zoom' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_LINK__ZOOM = 1; - - /** - * The feature id for the 'Viewport' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM_LINK__VIEWPORT = 2; - - /** - * The feature id for the 'Graph Element' reference. - * - * - * @generated - * @ordered - */ - int DIAGRAM_LINK__GRAPH_ELEMENT = 3; - - /** - * The number of structural features of the 'Diagram Link' class. - * - * @generated - * @ordered - */ - int DIAGRAM_LINK_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl - * Diagram}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagram() - * @generated - */ - int DIAGRAM = 8; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int DIAGRAM__PROPERTY = GRAPH_NODE__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__IS_VISIBLE = GRAPH_NODE__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int DIAGRAM__REFERENCE = GRAPH_NODE__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int DIAGRAM__CONTAINER = GRAPH_NODE__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__FONT_FAMILY = GRAPH_NODE__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__FONT_SIZE = GRAPH_NODE__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__LINE_STYLE = GRAPH_NODE__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM__LINE_THICKNESS = GRAPH_NODE__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__FONT_COLOR = GRAPH_NODE__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM__FOREGROUND_COLOR = GRAPH_NODE__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int DIAGRAM__BACKGROUND_COLOR = GRAPH_NODE__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__BORDER_COLOR = GRAPH_NODE__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__TRANSLUCENT = GRAPH_NODE__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int DIAGRAM__SEMANTIC_PARENT = GRAPH_NODE__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int DIAGRAM__SEMANTIC_CHILD = GRAPH_NODE__SEMANTIC_CHILD; - - /** - * The feature id for the 'Contained' containment reference list. - * - * @generated - * @ordered - */ - int DIAGRAM__CONTAINED = GRAPH_NODE__CONTAINED; - - /** - * The feature id for the 'Link' containment reference list. - * - * @generated - * @ordered - */ - int DIAGRAM__LINK = GRAPH_NODE__LINK; - - /** - * The feature id for the 'Semantic Model' containment reference. - * - * @generated - * @ordered - */ - int DIAGRAM__SEMANTIC_MODEL = GRAPH_NODE__SEMANTIC_MODEL; - - /** - * The feature id for the 'Position' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__POSITION = GRAPH_NODE__POSITION; - - /** - * The feature id for the 'Anchorage' containment reference list. - * - * @generated - * @ordered - */ - int DIAGRAM__ANCHORAGE = GRAPH_NODE__ANCHORAGE; - - /** - * The feature id for the 'Size' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__SIZE = GRAPH_NODE__SIZE; - - /** - * The feature id for the 'Owner' containment reference. - * - * - * @generated - * @ordered - */ - int DIAGRAM__OWNER = GRAPH_NODE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__NAME = GRAPH_NODE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Zoom' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__ZOOM = GRAPH_NODE_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Viewport' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__VIEWPORT = GRAPH_NODE_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Diagram Link' reference list. - * - * - * @generated - * @ordered - */ - int DIAGRAM__DIAGRAM_LINK = GRAPH_NODE_FEATURE_COUNT + 4; - - /** - * The feature id for the 'Type' attribute. - * - * @generated - * @ordered - */ - int DIAGRAM__TYPE = GRAPH_NODE_FEATURE_COUNT + 5; - - /** - * The number of structural features of the 'Diagram' class. - * - * - * @generated - * @ordered - */ - int DIAGRAM_FEATURE_COUNT = GRAPH_NODE_FEATURE_COUNT + 6; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl - * Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSemanticModelBridge() - * @generated - */ - int SEMANTIC_MODEL_BRIDGE = 9; - - /** - * The feature id for the 'Presentation' attribute. - * - * @generated - * @ordered - */ - int SEMANTIC_MODEL_BRIDGE__PRESENTATION = 0; - - /** - * The feature id for the 'Graph Element' reference. - * - * - * @generated - * @ordered - */ - int SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = 1; - - /** - * The number of structural features of the 'Semantic Model Bridge' class. - * - * @generated - * @ordered - */ - int SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = 2; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl - * Simple Semantic Model Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSimpleSemanticModelElement() - * @generated - */ - int SIMPLE_SEMANTIC_MODEL_ELEMENT = 10; - - /** - * The feature id for the 'Presentation' attribute. - * - * @generated - * @ordered - */ - int SIMPLE_SEMANTIC_MODEL_ELEMENT__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; - - /** - * The feature id for the 'Graph Element' reference. - * - * - * @generated - * @ordered - */ - int SIMPLE_SEMANTIC_MODEL_ELEMENT__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; - - /** - * The feature id for the 'Typeinfo' attribute. - * - * @generated - * @ordered - */ - int SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Simple Semantic Model Element' class. - * - * @generated - * @ordered - */ - int SIMPLE_SEMANTIC_MODEL_ELEMENT_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 1; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl - * Uml1 Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getUml1SemanticModelBridge() - * @generated - */ - int UML1_SEMANTIC_MODEL_BRIDGE = 11; - - /** - * The feature id for the 'Presentation' attribute. - * - * @generated - * @ordered - */ - int UML1_SEMANTIC_MODEL_BRIDGE__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; - - /** - * The feature id for the 'Graph Element' reference. - * - * - * @generated - * @ordered - */ - int UML1_SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; - - /** - * The feature id for the 'Element' reference. - * - * @generated - * @ordered - */ - int UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Uml1 Semantic Model Bridge' class. - * - * @generated - * @ordered - */ - int UML1_SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 1; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl - * Core Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getCoreSemanticModelBridge() - * @generated - */ - int CORE_SEMANTIC_MODEL_BRIDGE = 12; - - /** - * The feature id for the 'Presentation' attribute. - * - * @generated - * @ordered - */ - int CORE_SEMANTIC_MODEL_BRIDGE__PRESENTATION = SEMANTIC_MODEL_BRIDGE__PRESENTATION; - - /** - * The feature id for the 'Graph Element' reference. - * - * - * @generated - * @ordered - */ - int CORE_SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT; - - /** - * The number of structural features of the 'Core Semantic Model Bridge' class. - * - * @generated - * @ordered - */ - int CORE_SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT = SEMANTIC_MODEL_BRIDGE_FEATURE_COUNT + 0; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl Leaf Element}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getLeafElement() - * @generated - */ - int LEAF_ELEMENT = 13; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__PROPERTY = DIAGRAM_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__IS_VISIBLE = DIAGRAM_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__REFERENCE = DIAGRAM_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__CONTAINER = DIAGRAM_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__FONT_FAMILY = DIAGRAM_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__FONT_SIZE = DIAGRAM_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__LINE_STYLE = DIAGRAM_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__LINE_THICKNESS = DIAGRAM_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__FONT_COLOR = DIAGRAM_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__FOREGROUND_COLOR = DIAGRAM_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__BACKGROUND_COLOR = DIAGRAM_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__BORDER_COLOR = DIAGRAM_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__TRANSLUCENT = DIAGRAM_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__SEMANTIC_PARENT = DIAGRAM_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT__SEMANTIC_CHILD = DIAGRAM_ELEMENT__SEMANTIC_CHILD; - - /** - * The number of structural features of the 'Leaf Element' class. - * - * @generated - * @ordered - */ - int LEAF_ELEMENT_FEATURE_COUNT = DIAGRAM_ELEMENT_FEATURE_COUNT + 0; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl Text Element}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.TextElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getTextElement() - * @generated - */ - int TEXT_ELEMENT = 14; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__PROPERTY = LEAF_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__REFERENCE = LEAF_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__CONTAINER = LEAF_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Text' attribute. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT__TEXT = LEAF_ELEMENT_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Text Element' class. - * - * @generated - * @ordered - */ - int TEXT_ELEMENT_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl - * Image}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.ImageImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getImage() - * @generated - */ - int IMAGE = 15; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int IMAGE__PROPERTY = LEAF_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int IMAGE__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int IMAGE__REFERENCE = LEAF_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int IMAGE__CONTAINER = LEAF_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int IMAGE__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int IMAGE__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int IMAGE__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int IMAGE__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int IMAGE__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int IMAGE__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int IMAGE__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int IMAGE__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int IMAGE__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int IMAGE__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int IMAGE__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; - - /** - * The feature id for the 'Uri' attribute. - * - * @generated - * @ordered - */ - int IMAGE__URI = LEAF_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Mime Type' attribute. - * - * @generated - * @ordered - */ - int IMAGE__MIME_TYPE = LEAF_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Image' class. - * - * @generated - * @ordered - */ - int IMAGE_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 2; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl - * Graphic Primitive}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphicPrimitive() - * @generated - */ - int GRAPHIC_PRIMITIVE = 16; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__PROPERTY = LEAF_ELEMENT__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__IS_VISIBLE = LEAF_ELEMENT__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__REFERENCE = LEAF_ELEMENT__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__CONTAINER = LEAF_ELEMENT__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__FONT_FAMILY = LEAF_ELEMENT__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__FONT_SIZE = LEAF_ELEMENT__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__LINE_STYLE = LEAF_ELEMENT__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__LINE_THICKNESS = LEAF_ELEMENT__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__FONT_COLOR = LEAF_ELEMENT__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__FOREGROUND_COLOR = LEAF_ELEMENT__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__BACKGROUND_COLOR = LEAF_ELEMENT__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__BORDER_COLOR = LEAF_ELEMENT__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__TRANSLUCENT = LEAF_ELEMENT__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__SEMANTIC_PARENT = LEAF_ELEMENT__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE__SEMANTIC_CHILD = LEAF_ELEMENT__SEMANTIC_CHILD; - - /** - * The number of structural features of the 'Graphic Primitive' class. - * - * @generated - * @ordered - */ - int GRAPHIC_PRIMITIVE_FEATURE_COUNT = LEAF_ELEMENT_FEATURE_COUNT + 0; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl - * Polilyne}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPolilyne() - * @generated - */ - int POLILYNE = 17; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int POLILYNE__PROPERTY = GRAPHIC_PRIMITIVE__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__IS_VISIBLE = GRAPHIC_PRIMITIVE__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int POLILYNE__REFERENCE = GRAPHIC_PRIMITIVE__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int POLILYNE__CONTAINER = GRAPHIC_PRIMITIVE__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__FONT_FAMILY = GRAPHIC_PRIMITIVE__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__FONT_SIZE = GRAPHIC_PRIMITIVE__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__LINE_STYLE = GRAPHIC_PRIMITIVE__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int POLILYNE__LINE_THICKNESS = GRAPHIC_PRIMITIVE__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__FONT_COLOR = GRAPHIC_PRIMITIVE__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int POLILYNE__FOREGROUND_COLOR = GRAPHIC_PRIMITIVE__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int POLILYNE__BACKGROUND_COLOR = GRAPHIC_PRIMITIVE__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__BORDER_COLOR = GRAPHIC_PRIMITIVE__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int POLILYNE__TRANSLUCENT = GRAPHIC_PRIMITIVE__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int POLILYNE__SEMANTIC_PARENT = GRAPHIC_PRIMITIVE__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int POLILYNE__SEMANTIC_CHILD = GRAPHIC_PRIMITIVE__SEMANTIC_CHILD; - - /** - * The feature id for the 'Waypoints' attribute list. - * - * - * @generated - * @ordered - */ - int POLILYNE__WAYPOINTS = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Closed' attribute list. - * - * @generated - * @ordered - */ - int POLILYNE__CLOSED = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Polilyne' class. - * - * - * @generated - * @ordered - */ - int POLILYNE_FEATURE_COUNT = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl - * Ellipse}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.EllipseImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getEllipse() - * @generated - */ - int ELLIPSE = 18; - - /** - * The feature id for the 'Property' containment reference list. - * - * @generated - * @ordered - */ - int ELLIPSE__PROPERTY = GRAPHIC_PRIMITIVE__PROPERTY; - - /** - * The feature id for the 'Is Visible' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__IS_VISIBLE = GRAPHIC_PRIMITIVE__IS_VISIBLE; - - /** - * The feature id for the 'Reference' reference list. - * - * - * @generated - * @ordered - */ - int ELLIPSE__REFERENCE = GRAPHIC_PRIMITIVE__REFERENCE; - - /** - * The feature id for the 'Container' container reference. - * - * @generated - * @ordered - */ - int ELLIPSE__CONTAINER = GRAPHIC_PRIMITIVE__CONTAINER; - - /** - * The feature id for the 'Font Family' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__FONT_FAMILY = GRAPHIC_PRIMITIVE__FONT_FAMILY; - - /** - * The feature id for the 'Font Size' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__FONT_SIZE = GRAPHIC_PRIMITIVE__FONT_SIZE; - - /** - * The feature id for the 'Line Style' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__LINE_STYLE = GRAPHIC_PRIMITIVE__LINE_STYLE; - - /** - * The feature id for the 'Line Thickness' attribute. - * - * - * @generated - * @ordered - */ - int ELLIPSE__LINE_THICKNESS = GRAPHIC_PRIMITIVE__LINE_THICKNESS; - - /** - * The feature id for the 'Font Color' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__FONT_COLOR = GRAPHIC_PRIMITIVE__FONT_COLOR; - - /** - * The feature id for the 'Foreground Color' attribute. - * - * - * @generated - * @ordered - */ - int ELLIPSE__FOREGROUND_COLOR = GRAPHIC_PRIMITIVE__FOREGROUND_COLOR; - - /** - * The feature id for the 'Background Color' attribute. - * - * - * @generated - * @ordered - */ - int ELLIPSE__BACKGROUND_COLOR = GRAPHIC_PRIMITIVE__BACKGROUND_COLOR; - - /** - * The feature id for the 'Border Color' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__BORDER_COLOR = GRAPHIC_PRIMITIVE__BORDER_COLOR; - - /** - * The feature id for the 'Translucent' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__TRANSLUCENT = GRAPHIC_PRIMITIVE__TRANSLUCENT; - - /** - * The feature id for the 'Semantic Parent' reference. - * - * - * @generated - * @ordered - */ - int ELLIPSE__SEMANTIC_PARENT = GRAPHIC_PRIMITIVE__SEMANTIC_PARENT; - - /** - * The feature id for the 'Semantic Child' reference list. - * - * @generated - * @ordered - */ - int ELLIPSE__SEMANTIC_CHILD = GRAPHIC_PRIMITIVE__SEMANTIC_CHILD; - - /** - * The feature id for the 'Center' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__CENTER = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Radius X' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__RADIUS_X = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Radius Y' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__RADIUS_Y = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Rotation' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__ROTATION = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Start Angle' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__START_ANGLE = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 4; - - /** - * The feature id for the 'End Angle' attribute. - * - * @generated - * @ordered - */ - int ELLIPSE__END_ANGLE = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 5; - - /** - * The number of structural features of the 'Ellipse' class. - * - * - * @generated - * @ordered - */ - int ELLIPSE_FEATURE_COUNT = GRAPHIC_PRIMITIVE_FEATURE_COUNT + 6; - - /** - * The meta object id for the ' - * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * Papyrus Key Enumeration}' enum. - * - * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPapyrusKeyEnumeration() - * @generated - */ - int PAPYRUS_KEY_ENUMERATION = 19; - - /** - * The meta object id for the 'Point' data type. - * - * @see org.eclipse.draw2d.geometry.Point - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPoint() - * @generated - */ - int POINT = 20; - - /** - * The meta object id for the 'Dimension' data type. - * - * @see org.eclipse.draw2d.geometry.Dimension - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDimension() - * @generated - */ - int DIMENSION = 21; - - /** - * The meta object id for the 'Double' data type. - * - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDouble() - * @generated - */ - int DOUBLE = 22; - - /** - * The meta object id for the 'RGB' data type. - * - * @see org.eclipse.swt.graphics.RGB - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getRGB() - * @generated - */ - int RGB = 23; - - /** - * The meta object id for the 'String' data type. - * - * @see java.lang.String - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getString() - * @generated - */ - int STRING = 24; - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement Diagram Element}'. - * - * - * @return the meta object for class 'Diagram Element'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement - * @generated - */ - EClass getDiagramElement(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty Property} - * '. - * - * @return the meta object for the containment reference list 'Property'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty() - * @see #getDiagramElement() - * @generated - */ - EReference getDiagramElement_Property(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible - * Is Visible}'. - * - * @return the meta object for the attribute 'Is Visible'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_IsVisible(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getReference - * Reference}'. - * - * @return the meta object for the reference list 'Reference'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getReference() - * @see #getDiagramElement() - * @generated - */ - EReference getDiagramElement_Reference(); - - /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer - * Container}'. - * - * @return the meta object for the container reference 'Container'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer() - * @see #getDiagramElement() - * @generated - */ - EReference getDiagramElement_Container(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily - * Font Family}'. - * - * @return the meta object for the attribute 'Font Family'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_FontFamily(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} - * '. - * - * @return the meta object for the attribute 'Font Size'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_FontSize(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle - * Line Style}'. - * - * @return the meta object for the attribute 'Line Style'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_LineStyle(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness - * Line Thickness}'. - * - * @return the meta object for the attribute 'Line Thickness'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_LineThickness(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor - * Font Color}'. - * - * @return the meta object for the attribute 'Font Color'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_FontColor(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor - * Foreground Color}'. - * - * @return the meta object for the attribute 'Foreground Color'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_ForegroundColor(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor - * Background Color}'. - * - * @return the meta object for the attribute 'Background Color'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_BackgroundColor(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor - * Border Color}'. - * - * @return the meta object for the attribute 'Border Color'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_BorderColor(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent - * Translucent}'. - * - * @return the meta object for the attribute 'Translucent'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent() - * @see #getDiagramElement() - * @generated - */ - EAttribute getDiagramElement_Translucent(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent - * Semantic Parent}'. - * - * @return the meta object for the reference 'Semantic Parent'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent() - * @see #getDiagramElement() - * @generated - */ - EReference getDiagramElement_SemanticParent(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild - * Semantic Child}'. - * - * @return the meta object for the reference list 'Semantic Child'. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild() - * @see #getDiagramElement() - * @generated - */ - EReference getDiagramElement_SemanticChild(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement Graph Element}'. - * - * @return the meta object for class 'Graph Element'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement - * @generated - */ - EClass getGraphElement(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained} - * '. - * - * @return the meta object for the containment reference list 'Contained'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getContained() - * @see #getGraphElement() - * @generated - */ - EReference getGraphElement_Contained(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getLink Link}'. - * - * @return the meta object for the containment reference list 'Link'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getLink() - * @see #getGraphElement() - * @generated - */ - EReference getGraphElement_Link(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel - * Semantic Model}'. - * - * @return the meta object for the containment reference 'Semantic Model'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel() - * @see #getGraphElement() - * @generated - */ - EReference getGraphElement_SemanticModel(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}'. - * - * - * @return the meta object for the attribute 'Position'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getPosition() - * @see #getGraphElement() - * @generated - */ - EAttribute getGraphElement_Position(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage} - * '. - * - * @return the meta object for the containment reference list 'Anchorage'. - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage() - * @see #getGraphElement() - * @generated - */ - EReference getGraphElement_Anchorage(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Reference - * Reference}'. - * - * @return the meta object for class 'Reference'. - * @see org.eclipse.papyrus.conversion.di2.Reference - * @generated - */ - EClass getReference(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation - * Is Individual Representation}'. - * - * @return the meta object for the attribute 'Is Individual Representation'. - * @see org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation() - * @see #getReference() - * @generated - */ - EAttribute getReference_IsIndividualRepresentation(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}'. - * - * - * @return the meta object for the reference 'Referenced'. - * @see org.eclipse.papyrus.conversion.di2.Reference#getReferenced() - * @see #getReference() - * @generated - */ - EReference getReference_Referenced(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Property - * Property}'. - * - * @return the meta object for class 'Property'. - * @see org.eclipse.papyrus.conversion.di2.Property - * @generated - */ - EClass getProperty(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Property#getKey Key}'. - * - * @return the meta object for the attribute 'Key'. - * @see org.eclipse.papyrus.conversion.di2.Property#getKey() - * @see #getProperty() - * @generated - */ - EAttribute getProperty_Key(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Property#getValue Value}'. - * - * @return the meta object for the attribute 'Value'. - * @see org.eclipse.papyrus.conversion.di2.Property#getValue() - * @see #getProperty() - * @generated - */ - EAttribute getProperty_Value(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.GraphEdge - * Graph Edge}'. - * - * @return the meta object for class 'Graph Edge'. - * @see org.eclipse.papyrus.conversion.di2.GraphEdge - * @generated - */ - EClass getGraphEdge(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor Anchor}'. - * - * @return the meta object for the reference list 'Anchor'. - * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor() - * @see #getGraphEdge() - * @generated - */ - EReference getGraphEdge_Anchor(); - - /** - * Returns the meta object for the attribute list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints Waypoints}'. - * - * - * @return the meta object for the attribute list 'Waypoints'. - * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints() - * @see #getGraphEdge() - * @generated - */ - EAttribute getGraphEdge_Waypoints(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector Graph Connector}'. - * - * - * @return the meta object for class 'Graph Connector'. - * @see org.eclipse.papyrus.conversion.di2.GraphConnector - * @generated - */ - EClass getGraphConnector(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position} - * '. - * - * @return the meta object for the attribute 'Position'. - * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition() - * @see #getGraphConnector() - * @generated - */ - EAttribute getGraphConnector_Position(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge - * Graph Edge}'. - * - * @return the meta object for the reference list 'Graph Edge'. - * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge() - * @see #getGraphConnector() - * @generated - */ - EReference getGraphConnector_GraphEdge(); - - /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement - * Graph Element}'. - * - * @return the meta object for the container reference 'Graph Element'. - * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement() - * @see #getGraphConnector() - * @generated - */ - EReference getGraphConnector_GraphElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.GraphNode - * Graph Node}'. - * - * @return the meta object for class 'Graph Node'. - * @see org.eclipse.papyrus.conversion.di2.GraphNode - * @generated - */ - EClass getGraphNode(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize Size}'. - * - * @return the meta object for the attribute 'Size'. - * @see org.eclipse.papyrus.conversion.di2.GraphNode#getSize() - * @see #getGraphNode() - * @generated - */ - EAttribute getGraphNode_Size(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink Diagram Link}'. - * - * @return the meta object for class 'Diagram Link'. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink - * @generated - */ - EClass getDiagramLink(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram Diagram}'. - * - * - * @return the meta object for the reference 'Diagram'. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram() - * @see #getDiagramLink() - * @generated - */ - EReference getDiagramLink_Diagram(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom Zoom}'. - * - * @return the meta object for the attribute 'Zoom'. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom() - * @see #getDiagramLink() - * @generated - */ - EAttribute getDiagramLink_Zoom(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}'. - * - * - * @return the meta object for the attribute 'Viewport'. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport() - * @see #getDiagramLink() - * @generated - */ - EAttribute getDiagramLink_Viewport(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement - * Graph Element}'. - * - * @return the meta object for the reference 'Graph Element'. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement() - * @see #getDiagramLink() - * @generated - */ - EReference getDiagramLink_GraphElement(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Diagram - * Diagram}'. - * - * @return the meta object for class 'Diagram'. - * @see org.eclipse.papyrus.conversion.di2.Diagram - * @generated - */ - EClass getDiagram(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner Owner}'. - * - * @return the meta object for the containment reference 'Owner'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getOwner() - * @see #getDiagram() - * @generated - */ - EReference getDiagram_Owner(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getName Name}'. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getName() - * @see #getDiagram() - * @generated - */ - EAttribute getDiagram_Name(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom Zoom}'. - * - * @return the meta object for the attribute 'Zoom'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getZoom() - * @see #getDiagram() - * @generated - */ - EAttribute getDiagram_Zoom(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport Viewport}'. - * - * @return the meta object for the attribute 'Viewport'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getViewport() - * @see #getDiagram() - * @generated - */ - EAttribute getDiagram_Viewport(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink Diagram Link} - * '. - * - * @return the meta object for the reference list 'Diagram Link'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink() - * @see #getDiagram() - * @generated - */ - EReference getDiagram_DiagramLink(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram#getType Type}'. - * - * @return the meta object for the attribute 'Type'. - * @see org.eclipse.papyrus.conversion.di2.Diagram#getType() - * @see #getDiagram() - * @generated - */ - EAttribute getDiagram_Type(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge - * Semantic Model Bridge}'. - * - * @return the meta object for class 'Semantic Model Bridge'. - * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge - * @generated - */ - EClass getSemanticModelBridge(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation - * Presentation}'. - * - * @return the meta object for the attribute 'Presentation'. - * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation() - * @see #getSemanticModelBridge() - * @generated - */ - EAttribute getSemanticModelBridge_Presentation(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement - * Graph Element}'. - * - * @return the meta object for the reference 'Graph Element'. - * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement() - * @see #getSemanticModelBridge() - * @generated - */ - EReference getSemanticModelBridge_GraphElement(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement - * Simple Semantic Model Element}'. - * - * @return the meta object for class 'Simple Semantic Model Element'. - * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement - * @generated - */ - EClass getSimpleSemanticModelElement(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo - * Typeinfo}'. - * - * @return the meta object for the attribute 'Typeinfo'. - * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo() - * @see #getSimpleSemanticModelElement() - * @generated - */ - EAttribute getSimpleSemanticModelElement_Typeinfo(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge - * Uml1 Semantic Model Bridge}'. - * - * @return the meta object for class 'Uml1 Semantic Model Bridge'. - * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge - * @generated - */ - EClass getUml1SemanticModelBridge(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement - * Element}'. - * - * @return the meta object for the reference 'Element'. - * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement() - * @see #getUml1SemanticModelBridge() - * @generated - */ - EReference getUml1SemanticModelBridge_Element(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge - * Core Semantic Model Bridge}'. - * - * @return the meta object for class 'Core Semantic Model Bridge'. - * @see org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge - * @generated - */ - EClass getCoreSemanticModelBridge(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.LeafElement Leaf Element}'. - * - * @return the meta object for class 'Leaf Element'. - * @see org.eclipse.papyrus.conversion.di2.LeafElement - * @generated - */ - EClass getLeafElement(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.TextElement Text Element}'. - * - * @return the meta object for class 'Text Element'. - * @see org.eclipse.papyrus.conversion.di2.TextElement - * @generated - */ - EClass getTextElement(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.TextElement#getText Text}'. - * - * @return the meta object for the attribute 'Text'. - * @see org.eclipse.papyrus.conversion.di2.TextElement#getText() - * @see #getTextElement() - * @generated - */ - EAttribute getTextElement_Text(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Image - * Image}'. - * - * @return the meta object for class 'Image'. - * @see org.eclipse.papyrus.conversion.di2.Image - * @generated - */ - EClass getImage(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Image#getUri Uri}'. - * - * @return the meta object for the attribute 'Uri'. - * @see org.eclipse.papyrus.conversion.di2.Image#getUri() - * @see #getImage() - * @generated - */ - EAttribute getImage_Uri(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Image#getMimeType Mime Type}'. - * - * @return the meta object for the attribute 'Mime Type'. - * @see org.eclipse.papyrus.conversion.di2.Image#getMimeType() - * @see #getImage() - * @generated - */ - EAttribute getImage_MimeType(); - - /** - * Returns the meta object for class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphicPrimitive Graphic Primitive}'. - * - * - * @return the meta object for class 'Graphic Primitive'. - * @see org.eclipse.papyrus.conversion.di2.GraphicPrimitive - * @generated - */ - EClass getGraphicPrimitive(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Polilyne - * Polilyne}'. - * - * @return the meta object for class 'Polilyne'. - * @see org.eclipse.papyrus.conversion.di2.Polilyne - * @generated - */ - EClass getPolilyne(); - - /** - * Returns the meta object for the attribute list ' - * {@link org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints Waypoints}'. - * - * - * @return the meta object for the attribute list 'Waypoints'. - * @see org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints() - * @see #getPolilyne() - * @generated - */ - EAttribute getPolilyne_Waypoints(); - - /** - * Returns the meta object for the attribute list ' - * {@link org.eclipse.papyrus.conversion.di2.Polilyne#getClosed Closed}'. - * - * @return the meta object for the attribute list 'Closed'. - * @see org.eclipse.papyrus.conversion.di2.Polilyne#getClosed() - * @see #getPolilyne() - * @generated - */ - EAttribute getPolilyne_Closed(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.conversion.di2.Ellipse - * Ellipse}'. - * - * @return the meta object for class 'Ellipse'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse - * @generated - */ - EClass getEllipse(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter Center}'. - * - * @return the meta object for the attribute 'Center'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getCenter() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_Center(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX Radius X}'. - * - * @return the meta object for the attribute 'Radius X'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_RadiusX(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY Radius Y}'. - * - * @return the meta object for the attribute 'Radius Y'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_RadiusY(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation Rotation}'. - * - * @return the meta object for the attribute 'Rotation'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getRotation() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_Rotation(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle Start Angle}'. - * - * - * @return the meta object for the attribute 'Start Angle'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_StartAngle(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle End Angle}'. - * - * @return the meta object for the attribute 'End Angle'. - * @see org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle() - * @see #getEllipse() - * @generated - */ - EAttribute getEllipse_EndAngle(); - - /** - * Returns the meta object for enum ' - * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * Papyrus Key Enumeration}'. - * - * @return the meta object for enum 'Papyrus Key Enumeration'. - * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * @generated - */ - EEnum getPapyrusKeyEnumeration(); - - /** - * Returns the meta object for data type '{@link org.eclipse.draw2d.geometry.Point - * Point}'. - * - * @return the meta object for data type 'Point'. - * @see org.eclipse.draw2d.geometry.Point - * @model instanceClass="org.eclipse.draw2d.geometry.Point" - * @generated - */ - EDataType getPoint(); - - /** - * Returns the meta object for data type '{@link org.eclipse.draw2d.geometry.Dimension - * Dimension}'. - * - * @return the meta object for data type 'Dimension'. - * @see org.eclipse.draw2d.geometry.Dimension - * @model instanceClass="org.eclipse.draw2d.geometry.Dimension" - * @generated - */ - EDataType getDimension(); - - /** - * Returns the meta object for data type 'Double'. - * - * @return the meta object for data type 'Double'. - * @model instanceClass="double" - * @generated - */ - EDataType getDouble(); - - /** - * Returns the meta object for data type '{@link org.eclipse.swt.graphics.RGB RGB}'. - * - * - * @return the meta object for data type 'RGB'. - * @see org.eclipse.swt.graphics.RGB - * @model instanceClass="org.eclipse.swt.graphics.RGB" - * @generated - */ - EDataType getRGB(); - - /** - * Returns the meta object for data type '{@link java.lang.String String}'. - * - * @return the meta object for data type 'String'. - * @see java.lang.String - * @model instanceClass="java.lang.String" - * @generated - */ - EDataType getString(); - - /** - * Returns the factory that creates the instances of the model. - * - * @return the factory that creates the instances of the model. - * @generated - */ - Di2Factory getDi2Factory(); - - /** - * Defines literals for the meta objects that represent - *
      - *
    • each class,
    • - *
    • each feature of each class,
    • - *
    • each enum,
    • - *
    • and each data type
    • - *
    - * - * - * @generated - */ - interface Literals { - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl - * Diagram Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramElement() - * @generated - */ - EClass DIAGRAM_ELEMENT = eINSTANCE.getDiagramElement(); - - /** - * The meta object literal for the 'Property' containment reference list - * feature. - * - * @generated - */ - EReference DIAGRAM_ELEMENT__PROPERTY = eINSTANCE.getDiagramElement_Property(); - - /** - * The meta object literal for the 'Is Visible' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__IS_VISIBLE = eINSTANCE.getDiagramElement_IsVisible(); - - /** - * The meta object literal for the 'Reference' reference list feature. - * - * @generated - */ - EReference DIAGRAM_ELEMENT__REFERENCE = eINSTANCE.getDiagramElement_Reference(); - - /** - * The meta object literal for the 'Container' container reference feature. - * - * - * @generated - */ - EReference DIAGRAM_ELEMENT__CONTAINER = eINSTANCE.getDiagramElement_Container(); - - /** - * The meta object literal for the 'Font Family' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__FONT_FAMILY = eINSTANCE.getDiagramElement_FontFamily(); - - /** - * The meta object literal for the 'Font Size' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__FONT_SIZE = eINSTANCE.getDiagramElement_FontSize(); - - /** - * The meta object literal for the 'Line Style' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__LINE_STYLE = eINSTANCE.getDiagramElement_LineStyle(); - - /** - * The meta object literal for the 'Line Thickness' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__LINE_THICKNESS = eINSTANCE.getDiagramElement_LineThickness(); - - /** - * The meta object literal for the 'Font Color' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__FONT_COLOR = eINSTANCE.getDiagramElement_FontColor(); - - /** - * The meta object literal for the 'Foreground Color' attribute feature. - * - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__FOREGROUND_COLOR = eINSTANCE.getDiagramElement_ForegroundColor(); - - /** - * The meta object literal for the 'Background Color' attribute feature. - * - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__BACKGROUND_COLOR = eINSTANCE.getDiagramElement_BackgroundColor(); - - /** - * The meta object literal for the 'Border Color' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__BORDER_COLOR = eINSTANCE.getDiagramElement_BorderColor(); - - /** - * The meta object literal for the 'Translucent' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_ELEMENT__TRANSLUCENT = eINSTANCE.getDiagramElement_Translucent(); - - /** - * The meta object literal for the 'Semantic Parent' reference feature. - * - * @generated - */ - EReference DIAGRAM_ELEMENT__SEMANTIC_PARENT = eINSTANCE.getDiagramElement_SemanticParent(); - - /** - * The meta object literal for the 'Semantic Child' reference list feature. - * - * - * @generated - */ - EReference DIAGRAM_ELEMENT__SEMANTIC_CHILD = eINSTANCE.getDiagramElement_SemanticChild(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl - * Graph Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphElement() - * @generated - */ - EClass GRAPH_ELEMENT = eINSTANCE.getGraphElement(); - - /** - * The meta object literal for the 'Contained' containment reference list - * feature. - * - * @generated - */ - EReference GRAPH_ELEMENT__CONTAINED = eINSTANCE.getGraphElement_Contained(); - - /** - * The meta object literal for the 'Link' containment reference list - * feature. - * - * @generated - */ - EReference GRAPH_ELEMENT__LINK = eINSTANCE.getGraphElement_Link(); - - /** - * The meta object literal for the 'Semantic Model' containment reference - * feature. - * - * @generated - */ - EReference GRAPH_ELEMENT__SEMANTIC_MODEL = eINSTANCE.getGraphElement_SemanticModel(); - - /** - * The meta object literal for the 'Position' attribute feature. - * - * @generated - */ - EAttribute GRAPH_ELEMENT__POSITION = eINSTANCE.getGraphElement_Position(); - - /** - * The meta object literal for the 'Anchorage' containment reference list - * feature. - * - * @generated - */ - EReference GRAPH_ELEMENT__ANCHORAGE = eINSTANCE.getGraphElement_Anchorage(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl Reference}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getReference() - * @generated - */ - EClass REFERENCE = eINSTANCE.getReference(); - - /** - * The meta object literal for the 'Is Individual Representation' attribute - * feature. - * - * @generated - */ - EAttribute REFERENCE__IS_INDIVIDUAL_REPRESENTATION = eINSTANCE.getReference_IsIndividualRepresentation(); - - /** - * The meta object literal for the 'Referenced' reference feature. - * - * @generated - */ - EReference REFERENCE__REFERENCED = eINSTANCE.getReference_Referenced(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl Property}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.PropertyImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getProperty() - * @generated - */ - EClass PROPERTY = eINSTANCE.getProperty(); - - /** - * The meta object literal for the 'Key' attribute feature. - * - * @generated - */ - EAttribute PROPERTY__KEY = eINSTANCE.getProperty_Key(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * @generated - */ - EAttribute PROPERTY__VALUE = eINSTANCE.getProperty_Value(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl Graph Edge}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphEdge() - * @generated - */ - EClass GRAPH_EDGE = eINSTANCE.getGraphEdge(); - - /** - * The meta object literal for the 'Anchor' reference list feature. - * - * @generated - */ - EReference GRAPH_EDGE__ANCHOR = eINSTANCE.getGraphEdge_Anchor(); - - /** - * The meta object literal for the 'Waypoints' attribute list feature. - * - * @generated - */ - EAttribute GRAPH_EDGE__WAYPOINTS = eINSTANCE.getGraphEdge_Waypoints(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl - * Graph Connector}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphConnector() - * @generated - */ - EClass GRAPH_CONNECTOR = eINSTANCE.getGraphConnector(); - - /** - * The meta object literal for the 'Position' attribute feature. - * - * @generated - */ - EAttribute GRAPH_CONNECTOR__POSITION = eINSTANCE.getGraphConnector_Position(); - - /** - * The meta object literal for the 'Graph Edge' reference list feature. - * - * @generated - */ - EReference GRAPH_CONNECTOR__GRAPH_EDGE = eINSTANCE.getGraphConnector_GraphEdge(); - - /** - * The meta object literal for the 'Graph Element' container reference - * feature. - * - * @generated - */ - EReference GRAPH_CONNECTOR__GRAPH_ELEMENT = eINSTANCE.getGraphConnector_GraphElement(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl Graph Node}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphNode() - * @generated - */ - EClass GRAPH_NODE = eINSTANCE.getGraphNode(); - - /** - * The meta object literal for the 'Size' attribute feature. - * - * @generated - */ - EAttribute GRAPH_NODE__SIZE = eINSTANCE.getGraphNode_Size(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl - * Diagram Link}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagramLink() - * @generated - */ - EClass DIAGRAM_LINK = eINSTANCE.getDiagramLink(); - - /** - * The meta object literal for the 'Diagram' reference feature. - * - * @generated - */ - EReference DIAGRAM_LINK__DIAGRAM = eINSTANCE.getDiagramLink_Diagram(); - - /** - * The meta object literal for the 'Zoom' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_LINK__ZOOM = eINSTANCE.getDiagramLink_Zoom(); - - /** - * The meta object literal for the 'Viewport' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM_LINK__VIEWPORT = eINSTANCE.getDiagramLink_Viewport(); - - /** - * The meta object literal for the 'Graph Element' reference feature. - * - * @generated - */ - EReference DIAGRAM_LINK__GRAPH_ELEMENT = eINSTANCE.getDiagramLink_GraphElement(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl Diagram}' class. - * - * - * @see org.eclipse.papyrus.conversion.di2.impl.DiagramImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDiagram() - * @generated - */ - EClass DIAGRAM = eINSTANCE.getDiagram(); - - /** - * The meta object literal for the 'Owner' containment reference feature. - * - * - * @generated - */ - EReference DIAGRAM__OWNER = eINSTANCE.getDiagram_Owner(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM__NAME = eINSTANCE.getDiagram_Name(); - - /** - * The meta object literal for the 'Zoom' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM__ZOOM = eINSTANCE.getDiagram_Zoom(); - - /** - * The meta object literal for the 'Viewport' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM__VIEWPORT = eINSTANCE.getDiagram_Viewport(); - - /** - * The meta object literal for the 'Diagram Link' reference list feature. - * - * - * @generated - */ - EReference DIAGRAM__DIAGRAM_LINK = eINSTANCE.getDiagram_DiagramLink(); - - /** - * The meta object literal for the 'Type' attribute feature. - * - * @generated - */ - EAttribute DIAGRAM__TYPE = eINSTANCE.getDiagram_Type(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl - * Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSemanticModelBridge() - * @generated - */ - EClass SEMANTIC_MODEL_BRIDGE = eINSTANCE.getSemanticModelBridge(); - - /** - * The meta object literal for the 'Presentation' attribute feature. - * - * @generated - */ - EAttribute SEMANTIC_MODEL_BRIDGE__PRESENTATION = eINSTANCE.getSemanticModelBridge_Presentation(); - - /** - * The meta object literal for the 'Graph Element' reference feature. - * - * @generated - */ - EReference SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT = eINSTANCE.getSemanticModelBridge_GraphElement(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl - * Simple Semantic Model Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getSimpleSemanticModelElement() - * @generated - */ - EClass SIMPLE_SEMANTIC_MODEL_ELEMENT = eINSTANCE.getSimpleSemanticModelElement(); - - /** - * The meta object literal for the 'Typeinfo' attribute feature. - * - * @generated - */ - EAttribute SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO = eINSTANCE.getSimpleSemanticModelElement_Typeinfo(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl - * Uml1 Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getUml1SemanticModelBridge() - * @generated - */ - EClass UML1_SEMANTIC_MODEL_BRIDGE = eINSTANCE.getUml1SemanticModelBridge(); - - /** - * The meta object literal for the 'Element' reference feature. - * - * @generated - */ - EReference UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT = eINSTANCE.getUml1SemanticModelBridge_Element(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl - * Core Semantic Model Bridge}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.CoreSemanticModelBridgeImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getCoreSemanticModelBridge() - * @generated - */ - EClass CORE_SEMANTIC_MODEL_BRIDGE = eINSTANCE.getCoreSemanticModelBridge(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl - * Leaf Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.LeafElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getLeafElement() - * @generated - */ - EClass LEAF_ELEMENT = eINSTANCE.getLeafElement(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl - * Text Element}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.TextElementImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getTextElement() - * @generated - */ - EClass TEXT_ELEMENT = eINSTANCE.getTextElement(); - - /** - * The meta object literal for the 'Text' attribute feature. - * - * @generated - */ - EAttribute TEXT_ELEMENT__TEXT = eINSTANCE.getTextElement_Text(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl Image}' class. - * - * - * @see org.eclipse.papyrus.conversion.di2.impl.ImageImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getImage() - * @generated - */ - EClass IMAGE = eINSTANCE.getImage(); - - /** - * The meta object literal for the 'Uri' attribute feature. - * - * @generated - */ - EAttribute IMAGE__URI = eINSTANCE.getImage_Uri(); - - /** - * The meta object literal for the 'Mime Type' attribute feature. - * - * @generated - */ - EAttribute IMAGE__MIME_TYPE = eINSTANCE.getImage_MimeType(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl - * Graphic Primitive}' class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.GraphicPrimitiveImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getGraphicPrimitive() - * @generated - */ - EClass GRAPHIC_PRIMITIVE = eINSTANCE.getGraphicPrimitive(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl Polilyne}' - * class. - * - * @see org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPolilyne() - * @generated - */ - EClass POLILYNE = eINSTANCE.getPolilyne(); - - /** - * The meta object literal for the 'Waypoints' attribute list feature. - * - * @generated - */ - EAttribute POLILYNE__WAYPOINTS = eINSTANCE.getPolilyne_Waypoints(); - - /** - * The meta object literal for the 'Closed' attribute list feature. - * - * @generated - */ - EAttribute POLILYNE__CLOSED = eINSTANCE.getPolilyne_Closed(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl Ellipse}' class. - * - * - * @see org.eclipse.papyrus.conversion.di2.impl.EllipseImpl - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getEllipse() - * @generated - */ - EClass ELLIPSE = eINSTANCE.getEllipse(); - - /** - * The meta object literal for the 'Center' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__CENTER = eINSTANCE.getEllipse_Center(); - - /** - * The meta object literal for the 'Radius X' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__RADIUS_X = eINSTANCE.getEllipse_RadiusX(); - - /** - * The meta object literal for the 'Radius Y' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__RADIUS_Y = eINSTANCE.getEllipse_RadiusY(); - - /** - * The meta object literal for the 'Rotation' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__ROTATION = eINSTANCE.getEllipse_Rotation(); - - /** - * The meta object literal for the 'Start Angle' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__START_ANGLE = eINSTANCE.getEllipse_StartAngle(); - - /** - * The meta object literal for the 'End Angle' attribute feature. - * - * @generated - */ - EAttribute ELLIPSE__END_ANGLE = eINSTANCE.getEllipse_EndAngle(); - - /** - * The meta object literal for the ' - * {@link org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * Papyrus Key Enumeration}' enum. - * - * @see org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPapyrusKeyEnumeration() - * @generated - */ - EEnum PAPYRUS_KEY_ENUMERATION = eINSTANCE.getPapyrusKeyEnumeration(); - - /** - * The meta object literal for the 'Point' data type. - * - * @see org.eclipse.draw2d.geometry.Point - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getPoint() - * @generated - */ - EDataType POINT = eINSTANCE.getPoint(); - - /** - * The meta object literal for the 'Dimension' data type. - * - * - * @see org.eclipse.draw2d.geometry.Dimension - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDimension() - * @generated - */ - EDataType DIMENSION = eINSTANCE.getDimension(); - - /** - * The meta object literal for the 'Double' data type. - * - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getDouble() - * @generated - */ - EDataType DOUBLE = eINSTANCE.getDouble(); - - /** - * The meta object literal for the 'RGB' data type. - * - * @see org.eclipse.swt.graphics.RGB - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getRGB() - * @generated - */ - EDataType RGB = eINSTANCE.getRGB(); - - /** - * The meta object literal for the 'String' data type. - * - * @see java.lang.String - * @see org.eclipse.papyrus.conversion.di2.impl.Di2PackageImpl#getString() - * @generated - */ - EDataType STRING = eINSTANCE.getString(); - - } - -} // Di2Package diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java deleted file mode 100644 index e407669b999..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Diagram.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Diagram'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner Owner}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getName Name}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom Zoom}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport Viewport}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getDiagramLink Diagram Link}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Diagram#getType Type}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram() - * @model - * @generated - */ -public interface Diagram extends GraphNode { - - /** - * Returns the value of the 'Owner' containment reference. - *

    - * If the meaning of the 'Owner' containment reference isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Owner' containment reference. - * @see #setOwner(SemanticModelBridge) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Owner() - * @model containment="true" required="true" - * @generated - */ - SemanticModelBridge getOwner(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getOwner - * Owner}' containment reference. - * - * @param value - * the new value of the 'Owner' containment reference. - * @see #getOwner() - * @generated - */ - void setOwner(SemanticModelBridge value); - - /** - * Returns the value of the 'Name' attribute. - *

    - * If the meaning of the 'Name' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Name() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getName - * Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Zoom' attribute. - *

    - * If the meaning of the 'Zoom' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Zoom' attribute. - * @see #setZoom(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Zoom() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getZoom(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getZoom - * Zoom}' attribute. - * - * @param value - * the new value of the 'Zoom' attribute. - * @see #getZoom() - * @generated - */ - void setZoom(double value); - - /** - * Returns the value of the 'Viewport' attribute. - *

    - * If the meaning of the 'Viewport' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Viewport' attribute. - * @see #setViewport(Point) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Viewport() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - Point getViewport(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getViewport - * Viewport}' attribute. - * - * @param value - * the new value of the 'Viewport' attribute. - * @see #getViewport() - * @generated - */ - void setViewport(Point value); - - /** - * Returns the value of the 'Diagram Link' reference list. The list contents are - * of type {@link org.eclipse.papyrus.conversion.di2.DiagramLink}. - *

    - * If the meaning of the 'Diagram Link' reference list isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Diagram Link' reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_DiagramLink() - * @model - * @generated - */ - EList getDiagramLink(); - - /** - * Returns the value of the 'Type' attribute. - *

    - * If the meaning of the 'Type' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Type' attribute. - * @see #setType(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagram_Type() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getType(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Diagram#getType - * Type}' attribute. - * - * @param value - * the new value of the 'Type' attribute. - * @see #getType() - * @generated - */ - void setType(String value); - -} // Diagram diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java deleted file mode 100644 index 96ac0a3a71b..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramElement.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.swt.graphics.RGB; - -/** - * A representation of the model object 'Diagram Element'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getProperty Property}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible Is Visible - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getReference Reference - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer Container - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily Font Family - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} - *
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle Line Style - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness Line - * Thickness}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor Font Color - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor - * Foreground Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor - * Background Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor Border Color - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent Translucent - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent Semantic - * Parent}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild Semantic - * Child}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement() - * @model - * @generated - */ -public interface DiagramElement extends EObject { - - /** - * Returns the value of the 'Property' containment reference list. The list - * contents are of type {@link org.eclipse.papyrus.conversion.di2.Property}. - *

    - * If the meaning of the 'Property' containment reference list isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Property' containment reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Property() - * @model containment="true" - * @generated - */ - EList getProperty(); - - /** - * Returns the value of the 'Is Visible' attribute. - *

    - * If the meaning of the 'Is Visible' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Is Visible' attribute. - * @see #setIsVisible(boolean) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_IsVisible() - * @model dataType="org.eclipse.uml2.uml.Boolean" - * @generated - */ - boolean isIsVisible(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isIsVisible - * Is Visible}' attribute. - * - * @param value - * the new value of the 'Is Visible' attribute. - * @see #isIsVisible() - * @generated - */ - void setIsVisible(boolean value); - - /** - * Returns the value of the 'Reference' reference list. The list contents are of - * type {@link org.eclipse.papyrus.conversion.di2.Reference}. - *

    - * If the meaning of the 'Reference' reference list isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Reference' reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Reference() - * @model - * @generated - */ - EList getReference(); - - /** - * Returns the value of the 'Container' container reference. It is bidirectional - * and its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained} - * '. - *

    - * If the meaning of the 'Container' container reference isn't clear, there really - * should be more of a description here... - *

    - * - * - * @return the value of the 'Container' container reference. - * @see #setContainer(GraphElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Container() - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getContained - * @model opposite="contained" transient="false" - * @generated - */ - GraphElement getContainer(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer - * Container}' container reference. - * - * @param value - * the new value of the 'Container' container reference. - * @see #getContainer() - * @generated - */ - void setContainer(GraphElement value); - - /** - * Returns the value of the 'Font Family' attribute. The default value is - * "". - *

    - * If the meaning of the 'Font Family' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Font Family' attribute. - * @see #setFontFamily(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontFamily() - * @model default="" dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getFontFamily(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontFamily - * Font Family}' attribute. - * - * @param value - * the new value of the 'Font Family' attribute. - * @see #getFontFamily() - * @generated - */ - void setFontFamily(String value); - - /** - * Returns the value of the 'Font Size' attribute. The default value is - * "10". - *

    - * If the meaning of the 'Font Size' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Font Size' attribute. - * @see #setFontSize(int) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontSize() - * @model default="10" dataType="org.eclipse.uml2.uml.Integer" - * @generated - */ - int getFontSize(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontSize Font Size} - * ' attribute. - * - * @param value - * the new value of the 'Font Size' attribute. - * @see #getFontSize() - * @generated - */ - void setFontSize(int value); - - /** - * Returns the value of the 'Line Style' attribute. The default value is - * "". - *

    - * If the meaning of the 'Line Style' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Line Style' attribute. - * @see #setLineStyle(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_LineStyle() - * @model default="" dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getLineStyle(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineStyle - * Line Style}' attribute. - * - * @param value - * the new value of the 'Line Style' attribute. - * @see #getLineStyle() - * @generated - */ - void setLineStyle(String value); - - /** - * Returns the value of the 'Line Thickness' attribute. The default value is - * "1". - *

    - * If the meaning of the 'Line Thickness' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Line Thickness' attribute. - * @see #setLineThickness(int) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_LineThickness() - * @model default="1" dataType="org.eclipse.uml2.uml.Integer" - * @generated - */ - int getLineThickness(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getLineThickness - * Line Thickness}' attribute. - * - * @param value - * the new value of the 'Line Thickness' attribute. - * @see #getLineThickness() - * @generated - */ - void setLineThickness(int value); - - /** - * Returns the value of the 'Font Color' attribute. - *

    - * If the meaning of the 'Font Color' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Font Color' attribute. - * @see #setFontColor(RGB) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_FontColor() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" - * @generated - */ - RGB getFontColor(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getFontColor - * Font Color}' attribute. - * - * @param value - * the new value of the 'Font Color' attribute. - * @see #getFontColor() - * @generated - */ - void setFontColor(RGB value); - - /** - * Returns the value of the 'Foreground Color' attribute. - *

    - * If the meaning of the 'Foreground Color' attribute isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Foreground Color' attribute. - * @see #setForegroundColor(RGB) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_ForegroundColor() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" - * @generated - */ - RGB getForegroundColor(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getForegroundColor - * Foreground Color}' attribute. - * - * @param value - * the new value of the 'Foreground Color' attribute. - * @see #getForegroundColor() - * @generated - */ - void setForegroundColor(RGB value); - - /** - * Returns the value of the 'Background Color' attribute. - *

    - * If the meaning of the 'Background Color' attribute isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Background Color' attribute. - * @see #setBackgroundColor(RGB) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_BackgroundColor() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" - * @generated - */ - RGB getBackgroundColor(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBackgroundColor - * Background Color}' attribute. - * - * @param value - * the new value of the 'Background Color' attribute. - * @see #getBackgroundColor() - * @generated - */ - void setBackgroundColor(RGB value); - - /** - * Returns the value of the 'Border Color' attribute. - *

    - * If the meaning of the 'Border Color' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Border Color' attribute. - * @see #setBorderColor(RGB) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_BorderColor() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.RGB" - * @generated - */ - RGB getBorderColor(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getBorderColor - * Border Color}' attribute. - * - * @param value - * the new value of the 'Border Color' attribute. - * @see #getBorderColor() - * @generated - */ - void setBorderColor(RGB value); - - /** - * Returns the value of the 'Translucent' attribute. - *

    - * If the meaning of the 'Translucent' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Translucent' attribute. - * @see #setTranslucent(boolean) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_Translucent() - * @model dataType="org.eclipse.uml2.uml.Boolean" - * @generated - */ - boolean isTranslucent(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#isTranslucent - * Translucent}' attribute. - * - * @param value - * the new value of the 'Translucent' attribute. - * @see #isTranslucent() - * @generated - */ - void setTranslucent(boolean value); - - /** - * Returns the value of the 'Semantic Parent' reference. It is bidirectional and - * its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild - * Semantic Child}'. - *

    - * If the meaning of the 'Semantic Parent' reference isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Semantic Parent' reference. - * @see #setSemanticParent(DiagramElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_SemanticParent() - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticChild - * @model opposite="semanticChild" - * @generated - */ - DiagramElement getSemanticParent(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent - * Semantic Parent}' reference. - * - * @param value - * the new value of the 'Semantic Parent' reference. - * @see #getSemanticParent() - * @generated - */ - void setSemanticParent(DiagramElement value); - - /** - * Returns the value of the 'Semantic Child' reference list. The list contents - * are of type {@link org.eclipse.papyrus.conversion.di2.DiagramElement}. It is - * bidirectional and its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent - * Semantic Parent}'. - *

    - * If the meaning of the 'Semantic Child' reference list isn't clear, there really - * should be more of a description here... - *

    - * - * - * @return the value of the 'Semantic Child' reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramElement_SemanticChild() - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getSemanticParent - * @model opposite="semanticParent" - * @generated - */ - EList getSemanticChild(); - - /** - * - * - * @model keyDataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body='java.util.Iterator it = getProperty().iterator();\r\nwhile (it.hasNext()) {\r\n\tProperty element = (Property) it.next();\r\n\tif(key.equals(element.getKey())) {\r\n\t\treturn element;\r\n\t}\r\n}\r\nreturn null;'" - * @generated - */ - Property getProperty(String key); - - /** - * - * - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.String" - * keyDataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body=' if(this.getProperty(key)!=null){\r\n\treturn this.getProperty(key).getValue();}\r\nreturn null;\r\n\t'" - * @generated - */ - String getPropertyValue(String key); - - /** - * it is used to obtain - * the name of the good editpart - * - * @model kind="operation" dataType="org.eclipse.uml2.uml.String" annotation="http://www.eclipse.org/emf/2002/GenModel body='return this.getPropertyValue(com.cea.papyrus.diagraminterchange2.di2.PapyrusKeyEnumeration.PAPYRUSEDITPART.getLiteral());'" - * @generated - */ - String getEditpartName(); - -} // DiagramElement diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java deleted file mode 100644 index ad9325318a6..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/DiagramLink.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Diagram Link'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram Diagram}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom Zoom}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement Graph Element - * }
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink() - * @model - * @generated - */ -public interface DiagramLink extends EObject { - - /** - * Returns the value of the 'Diagram' reference. - *

    - * If the meaning of the 'Diagram' reference isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Diagram' reference. - * @see #setDiagram(Diagram) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Diagram() - * @model required="true" - * @generated - */ - Diagram getDiagram(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.DiagramLink#getDiagram - * Diagram}' reference. - * - * @param value - * the new value of the 'Diagram' reference. - * @see #getDiagram() - * @generated - */ - void setDiagram(Diagram value); - - /** - * Returns the value of the 'Zoom' attribute. - *

    - * If the meaning of the 'Zoom' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Zoom' attribute. - * @see #setZoom(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Zoom() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getZoom(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.DiagramLink#getZoom - * Zoom}' attribute. - * - * @param value - * the new value of the 'Zoom' attribute. - * @see #getZoom() - * @generated - */ - void setZoom(double value); - - /** - * Returns the value of the 'Viewport' attribute. - *

    - * If the meaning of the 'Viewport' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Viewport' attribute. - * @see #setViewport(Point) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_Viewport() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - Point getViewport(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getViewport Viewport}' - * attribute. - * - * @param value - * the new value of the 'Viewport' attribute. - * @see #getViewport() - * @generated - */ - void setViewport(Point value); - - /** - * Returns the value of the 'Graph Element' reference. - *

    - * If the meaning of the 'Graph Element' reference isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Graph Element' reference. - * @see #setGraphElement(GraphElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getDiagramLink_GraphElement() - * @model required="true" - * @generated - */ - GraphElement getGraphElement(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink#getGraphElement - * Graph Element}' reference. - * - * @param value - * the new value of the 'Graph Element' reference. - * @see #getGraphElement() - * @generated - */ - void setGraphElement(GraphElement value); - -} // DiagramLink diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java deleted file mode 100644 index 201533a1643..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Ellipse.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -/** - * A representation of the model object 'Ellipse'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter Center}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX Radius X}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY Radius Y}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation Rotation}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle Start Angle}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle End Angle}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse() - * @model - * @generated - */ -public interface Ellipse extends GraphicPrimitive { - - /** - * Returns the value of the 'Center' attribute. - *

    - * If the meaning of the 'Center' attribute isn't clear, there really should be more of - * a description here... - *

    - * - * - * @return the value of the 'Center' attribute. - * @see #setCenter(Point) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_Center() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - Point getCenter(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getCenter - * Center}' attribute. - * - * @param value - * the new value of the 'Center' attribute. - * @see #getCenter() - * @generated - */ - void setCenter(Point value); - - /** - * Returns the value of the 'Radius X' attribute. - *

    - * If the meaning of the 'Radius X' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Radius X' attribute. - * @see #setRadiusX(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_RadiusX() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getRadiusX(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusX - * Radius X}' attribute. - * - * @param value - * the new value of the 'Radius X' attribute. - * @see #getRadiusX() - * @generated - */ - void setRadiusX(double value); - - /** - * Returns the value of the 'Radius Y' attribute. - *

    - * If the meaning of the 'Radius Y' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Radius Y' attribute. - * @see #setRadiusY(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_RadiusY() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getRadiusY(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRadiusY - * Radius Y}' attribute. - * - * @param value - * the new value of the 'Radius Y' attribute. - * @see #getRadiusY() - * @generated - */ - void setRadiusY(double value); - - /** - * Returns the value of the 'Rotation' attribute. - *

    - * If the meaning of the 'Rotation' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Rotation' attribute. - * @see #setRotation(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_Rotation() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getRotation(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getRotation - * Rotation}' attribute. - * - * @param value - * the new value of the 'Rotation' attribute. - * @see #getRotation() - * @generated - */ - void setRotation(double value); - - /** - * Returns the value of the 'Start Angle' attribute. - *

    - * If the meaning of the 'Start Angle' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Start Angle' attribute. - * @see #setStartAngle(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_StartAngle() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getStartAngle(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getStartAngle - * Start Angle}' attribute. - * - * @param value - * the new value of the 'Start Angle' attribute. - * @see #getStartAngle() - * @generated - */ - void setStartAngle(double value); - - /** - * Returns the value of the 'End Angle' attribute. - *

    - * If the meaning of the 'End Angle' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'End Angle' attribute. - * @see #setEndAngle(double) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getEllipse_EndAngle() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Double" - * @generated - */ - double getEndAngle(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Ellipse#getEndAngle - * End Angle}' attribute. - * - * @param value - * the new value of the 'End Angle' attribute. - * @see #getEndAngle() - * @generated - */ - void setEndAngle(double value); - -} // Ellipse diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java deleted file mode 100644 index f2c69450c48..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphConnector.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Graph Connector'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge Graph Edge - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement Graph - * Element}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector() - * @model - * @generated - */ -public interface GraphConnector extends EObject { - - /** - * Returns the value of the 'Position' attribute. - *

    - * If the meaning of the 'Position' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Position' attribute. - * @see #setPosition(Point) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_Position() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - Point getPosition(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getPosition Position}' - * attribute. - * - * @param value - * the new value of the 'Position' attribute. - * @see #getPosition() - * @generated - */ - void setPosition(Point value); - - /** - * Returns the value of the 'Graph Edge' reference list. The list contents are - * of type {@link org.eclipse.papyrus.conversion.di2.GraphEdge}. It is bidirectional and - * its opposite is '{@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor - * Anchor}'. - *

    - * If the meaning of the 'Graph Edge' reference list isn't clear, there really should - * be more of a description here... - *

    - * - * - * @return the value of the 'Graph Edge' reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_GraphEdge() - * @see org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor - * @model opposite="anchor" - * @generated - */ - EList getGraphEdge(); - - /** - * Returns the value of the 'Graph Element' container reference. It is - * bidirectional and its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage} - * '. - *

    - * If the meaning of the 'Graph Element' container reference isn't clear, there really - * should be more of a description here... - *

    - * - * - * @return the value of the 'Graph Element' container reference. - * @see #setGraphElement(GraphElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphConnector_GraphElement() - * @see org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage - * @model opposite="anchorage" required="true" transient="false" - * @generated - */ - GraphElement getGraphElement(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement - * Graph Element}' container reference. - * - * @param value - * the new value of the 'Graph Element' container reference. - * @see #getGraphElement() - * @generated - */ - void setGraphElement(GraphElement value); - -} // GraphConnector diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java deleted file mode 100644 index c67362796e9..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphEdge.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Graph Edge'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getAnchor Anchor}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphEdge#getWaypoints Waypoints}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge() - * @model - * @generated - */ -public interface GraphEdge extends GraphElement { - - /** - * Returns the value of the 'Anchor' reference list. The list contents are of - * type {@link org.eclipse.papyrus.conversion.di2.GraphConnector}. It is bidirectional and - * its opposite is '{@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge - * Graph Edge}'. - *

    - * If the meaning of the 'Anchor' reference list isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Anchor' reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge_Anchor() - * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphEdge - * @model opposite="graphEdge" upper="2" - * @generated - */ - EList getAnchor(); - - /** - * Returns the value of the 'Waypoints' attribute list. The list contents are of - * type {@link org.eclipse.draw2d.geometry.Point}. - *

    - * If the meaning of the 'Waypoints' attribute list isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Waypoints' attribute list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphEdge_Waypoints() - * @model default="" dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - EList getWaypoints(); - - /** - * - * - * @model kind="operation" annotation="http://www.eclipse.org/emf/2002/GenModel body='return ((GraphConnector)getAnchor().get(0)).getGraphElement();'" - * @generated - */ - GraphElement getAnchorSource(); - - /** - * - * - * @model kind="operation" annotation="http://www.eclipse.org/emf/2002/GenModel body='return ((GraphConnector)getAnchor().get(1)).getGraphElement();'" - * @generated - */ - GraphElement getAnchorTarget(); - - /** - * - * - * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='initConnectors();\r\n((GraphConnector)getAnchor().get(0)).setGraphElement(value);'" - * @generated - */ - void setAnchorSource(GraphElement value); - - /** - * - * - * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='initConnectors();\r\n((GraphConnector)getAnchor().get(1)).setGraphElement(value);'" - * @generated - */ - void setAnchorTarget(GraphElement value); - - /** - * - * - * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='if(!getAnchor().isEmpty())\r\n return;\r\n \t\r\ngetAnchor().add( Di2Package.eINSTANCE.getDi2Factory().createGraphConnector() ) ;\r\ngetAnchor().add( Di2Package.eINSTANCE.getDi2Factory().createGraphConnector() ) ;\r\n'" - * @generated - */ - void initConnectors(); - -} // GraphEdge diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java deleted file mode 100644 index 7a53f116396..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphElement.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Graph Element'. - * - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getContained Contained}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getLink Link}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel Semantic - * Model}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphElement#getAnchorage Anchorage}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement() - * @model - * @generated - */ -public interface GraphElement extends DiagramElement { - - /** - * Returns the value of the 'Contained' containment reference list. The list - * contents are of type {@link org.eclipse.papyrus.conversion.di2.DiagramElement}. It is - * bidirectional and its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer - * Container}'. - *

    - * If the meaning of the 'Contained' containment reference list isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Contained' containment reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Contained() - * @see org.eclipse.papyrus.conversion.di2.DiagramElement#getContainer - * @model opposite="container" containment="true" - * @generated - */ - EList getContained(); - - /** - * Returns the value of the 'Link' containment reference list. The list contents - * are of type {@link org.eclipse.papyrus.conversion.di2.DiagramLink}. - *

    - * If the meaning of the 'Link' containment reference list isn't clear, there really - * should be more of a description here... - *

    - * - * - * @return the value of the 'Link' containment reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Link() - * @model containment="true" - * @generated - */ - EList getLink(); - - /** - * Returns the value of the 'Semantic Model' containment reference. - *

    - * If the meaning of the 'Semantic Model' containment reference isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Semantic Model' containment reference. - * @see #setSemanticModel(SemanticModelBridge) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_SemanticModel() - * @model containment="true" - * @generated - */ - SemanticModelBridge getSemanticModel(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getSemanticModel - * Semantic Model}' containment reference. - * - * @param value - * the new value of the 'Semantic Model' containment reference. - * @see #getSemanticModel() - * @generated - */ - void setSemanticModel(SemanticModelBridge value); - - /** - * Returns the value of the 'Position' attribute. - *

    - * If the meaning of the 'Position' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Position' attribute. - * @see #setPosition(Point) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Position() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" - * @generated - */ - Point getPosition(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement#getPosition Position}' - * attribute. - * - * @param value - * the new value of the 'Position' attribute. - * @see #getPosition() - * @generated - */ - void setPosition(Point value); - - /** - * Returns the value of the 'Anchorage' containment reference list. The list - * contents are of type {@link org.eclipse.papyrus.conversion.di2.GraphConnector}. It is - * bidirectional and its opposite is ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement - * Graph Element}'. - *

    - * If the meaning of the 'Anchorage' containment reference list isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Anchorage' containment reference list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphElement_Anchorage() - * @see org.eclipse.papyrus.conversion.di2.GraphConnector#getGraphElement - * @model opposite="graphElement" containment="true" - * @generated - */ - EList getAnchorage(); - -} // GraphElement diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java deleted file mode 100644 index 15c4722f878..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphNode.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Dimension; - -/** - * A representation of the model object 'Graph Node'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize Size}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphNode() - * @model - * @generated - */ -public interface GraphNode extends GraphElement { - - /** - * Returns the value of the 'Size' attribute. - *

    - * If the meaning of the 'Size' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Size' attribute. - * @see #setSize(Dimension) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphNode_Size() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Dimension" - * @generated - */ - Dimension getSize(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.GraphNode#getSize - * Size}' attribute. - * - * @param value - * the new value of the 'Size' attribute. - * @see #getSize() - * @generated - */ - void setSize(Dimension value); - -} // GraphNode diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java deleted file mode 100644 index 2b3a65939f8..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/GraphicPrimitive.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object 'Graphic Primitive'. - * - * - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getGraphicPrimitive() - * @model - * @generated - */ -public interface GraphicPrimitive extends LeafElement { -} // GraphicPrimitive diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java deleted file mode 100644 index 41157e8b0ef..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Image.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object 'Image'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Image#getUri Uri}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Image#getMimeType Mime Type}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage() - * @model - * @generated - */ -public interface Image extends LeafElement { - - /** - * Returns the value of the 'Uri' attribute. - *

    - * If the meaning of the 'Uri' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Uri' attribute. - * @see #setUri(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage_Uri() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getUri(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Image#getUri - * Uri}' attribute. - * - * @param value - * the new value of the 'Uri' attribute. - * @see #getUri() - * @generated - */ - void setUri(String value); - - /** - * Returns the value of the 'Mime Type' attribute. - *

    - * If the meaning of the 'Mime Type' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Mime Type' attribute. - * @see #setMimeType(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getImage_MimeType() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getMimeType(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Image#getMimeType - * Mime Type}' attribute. - * - * @param value - * the new value of the 'Mime Type' attribute. - * @see #getMimeType() - * @generated - */ - void setMimeType(String value); - -} // Image diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java deleted file mode 100644 index 4b98cb5a984..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/LeafElement.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object 'Leaf Element'. - * - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getLeafElement() - * @model - * @generated - */ -public interface LeafElement extends DiagramElement { -} // LeafElement diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java deleted file mode 100644 index f7454d77909..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/PapyrusKeyEnumeration.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * A representation of the literals of the enumeration ' - * Papyrus Key Enumeration', and utility methods for working with them. - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPapyrusKeyEnumeration() - * @model - * @generated - */ -public enum PapyrusKeyEnumeration implements Enumerator { - /** - * The 'Papyruseditpart' literal object. - * - * @see #PAPYRUSEDITPART_VALUE - * @generated - * @ordered - */ - PAPYRUSEDITPART(0, "papyruseditpart", "papyruseditpart"); - - /** - * The 'Papyruseditpart' literal value. - *

    - * If the meaning of 'Papyruseditpart' literal object isn't clear, there really - * should be more of a description here... - *

    - * - * - * @see #PAPYRUSEDITPART - * @model name="papyruseditpart" - * @generated - * @ordered - */ - public static final int PAPYRUSEDITPART_VALUE = 0; - - /** - * An array of all the 'Papyrus Key Enumeration' enumerators. - * - * @generated - */ - private static final PapyrusKeyEnumeration[] VALUES_ARRAY = new PapyrusKeyEnumeration[] { PAPYRUSEDITPART, }; - - /** - * A public read-only list of all the 'Papyrus Key Enumeration' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Papyrus Key Enumeration' literal with the specified literal - * value. - * - * @generated - */ - public static PapyrusKeyEnumeration get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - PapyrusKeyEnumeration result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Papyrus Key Enumeration' literal with the specified name. - * - * @generated - */ - public static PapyrusKeyEnumeration getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - PapyrusKeyEnumeration result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Papyrus Key Enumeration' literal with the specified integer - * value. - * - * @generated - */ - public static PapyrusKeyEnumeration get(int value) { - switch (value) { - case PAPYRUSEDITPART_VALUE: - return PAPYRUSEDITPART; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * @generated - */ - private PapyrusKeyEnumeration(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} // PapyrusKeyEnumeration diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java deleted file mode 100644 index ea5529820ed..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Polilyne.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Polilyne'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Polilyne#getWaypoints Waypoints}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Polilyne#getClosed Closed}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne() - * @model - * @generated - */ -public interface Polilyne extends GraphicPrimitive { - - /** - * Returns the value of the 'Waypoints' attribute list. The list contents are of - * type {@link org.eclipse.draw2d.geometry.Point}. - *

    - * If the meaning of the 'Waypoints' attribute list isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Waypoints' attribute list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne_Waypoints() - * @model dataType="com.cea.papyrus.diagraminterchange2.di2.Point" lower="2" - * @generated - */ - EList getWaypoints(); - - /** - * Returns the value of the 'Closed' attribute list. The list contents are of - * type {@link java.lang.Boolean}. - *

    - * If the meaning of the 'Closed' attribute list isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Closed' attribute list. - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getPolilyne_Closed() - * @model dataType="org.eclipse.uml2.uml.Boolean" lower="2" - * @generated - */ - EList getClosed(); - -} // Polilyne diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java deleted file mode 100644 index 722cf36092a..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Property.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Property'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Property#getKey Key}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Property#getValue Value}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty() - * @model - * @generated - */ -public interface Property extends EObject { - - /** - * Returns the value of the 'Key' attribute. - *

    - * If the meaning of the 'Key' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Key' attribute. - * @see #setKey(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty_Key() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getKey(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Property#getKey - * Key}' attribute. - * - * @param value - * the new value of the 'Key' attribute. - * @see #getKey() - * @generated - */ - void setKey(String value); - - /** - * Returns the value of the 'Value' attribute. - *

    - * If the meaning of the 'Value' attribute isn't clear, there really should be more of - * a description here... - *

    - * - * - * @return the value of the 'Value' attribute. - * @see #setValue(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getProperty_Value() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getValue(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.Property#getValue - * Value}' attribute. - * - * @param value - * the new value of the 'Value' attribute. - * @see #getValue() - * @generated - */ - void setValue(String value); - -} // Property diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java deleted file mode 100644 index 7a67ed0e5fa..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Reference.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object 'Reference'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation Is - * Individual Representation}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference() - * @model - * @generated - */ -public interface Reference extends DiagramElement { - - /** - * Returns the value of the 'Is Individual Representation' attribute. - *

    - * If the meaning of the 'Is Individual Representation' attribute isn't clear, there - * really should be more of a description here... - *

    - * - * - * @return the value of the 'Is Individual Representation' attribute. - * @see #setIsIndividualRepresentation(boolean) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference_IsIndividualRepresentation() - * @model dataType="org.eclipse.uml2.uml.Boolean" - * @generated - */ - boolean isIsIndividualRepresentation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.Reference#isIsIndividualRepresentation - * Is Individual Representation}' attribute. - * - * @param value - * the new value of the 'Is Individual Representation' attribute. - * @see #isIsIndividualRepresentation() - * @generated - */ - void setIsIndividualRepresentation(boolean value); - - /** - * Returns the value of the 'Referenced' reference. - *

    - * If the meaning of the 'Referenced' reference isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Referenced' reference. - * @see #setReferenced(DiagramElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getReference_Referenced() - * @model required="true" - * @generated - */ - DiagramElement getReferenced(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.Reference#getReferenced Referenced}' - * reference. - * - * @param value - * the new value of the 'Referenced' reference. - * @see #getReferenced() - * @generated - */ - void setReferenced(DiagramElement value); - -} // Reference diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java deleted file mode 100644 index 01086766fef..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SemanticModelBridge.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object ' - * Semantic Model Bridge'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation - * Presentation}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement Graph - * Element}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge() - * @model - * @generated - */ -public interface SemanticModelBridge extends EObject { - - /** - * Returns the value of the 'Presentation' attribute. - *

    - * If the meaning of the 'Presentation' attribute isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Presentation' attribute. - * @see #setPresentation(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge_Presentation() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getPresentation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getPresentation - * Presentation}' attribute. - * - * @param value - * the new value of the 'Presentation' attribute. - * @see #getPresentation() - * @generated - */ - void setPresentation(String value); - - /** - * Returns the value of the 'Graph Element' reference. - *

    - * If the meaning of the 'Graph Element' reference isn't clear, there really should be - * more of a description here... - *

    - * - * - * @return the value of the 'Graph Element' reference. - * @see #setGraphElement(GraphElement) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSemanticModelBridge_GraphElement() - * @model - * @generated - */ - GraphElement getGraphElement(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge#getGraphElement - * Graph Element}' reference. - * - * @param value - * the new value of the 'Graph Element' reference. - * @see #getGraphElement() - * @generated - */ - void setGraphElement(GraphElement value); - -} // SemanticModelBridge diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java deleted file mode 100644 index 0177655afb4..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/SimpleSemanticModelElement.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object ' - * Simple Semantic Model Element'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo - * Typeinfo}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSimpleSemanticModelElement() - * @model - * @generated - */ -public interface SimpleSemanticModelElement extends SemanticModelBridge { - - /** - * Returns the value of the 'Typeinfo' attribute. - *

    - * If the meaning of the 'Typeinfo' attribute isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Typeinfo' attribute. - * @see #setTypeinfo(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getSimpleSemanticModelElement_Typeinfo() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getTypeinfo(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement#getTypeinfo - * Typeinfo}' attribute. - * - * @param value - * the new value of the 'Typeinfo' attribute. - * @see #getTypeinfo() - * @generated - */ - void setTypeinfo(String value); - -} // SimpleSemanticModelElement diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java deleted file mode 100644 index 5c95c1f6012..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/TextElement.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -/** - * A representation of the model object 'Text Element'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.TextElement#getText Text}
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getTextElement() - * @model - * @generated - */ -public interface TextElement extends LeafElement { - - /** - * Returns the value of the 'Text' attribute. - *

    - * If the meaning of the 'Text' attribute isn't clear, there really should be more of a - * description here... - *

    - * - * - * @return the value of the 'Text' attribute. - * @see #setText(String) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getTextElement_Text() - * @model dataType="org.eclipse.uml2.uml.String" - * @generated - */ - String getText(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.conversion.di2.TextElement#getText - * Text}' attribute. - * - * @param value - * the new value of the 'Text' attribute. - * @see #getText() - * @generated - */ - void setText(String value); - -} // TextElement diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java deleted file mode 100644 index 1b167ab6e98..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/Uml1SemanticModelBridge.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2; - -import org.eclipse.uml2.uml.Element; - -/** - * A representation of the model object ' - * Uml1 Semantic Model Bridge'. - * - *

    - * The following features are supported: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement Element - * }
    • - *
    - *

    - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getUml1SemanticModelBridge() - * @model - * @generated - */ -public interface Uml1SemanticModelBridge extends SemanticModelBridge { - - /** - * Returns the value of the 'Element' reference. - *

    - * If the meaning of the 'Element' reference isn't clear, there really should be more - * of a description here... - *

    - * - * - * @return the value of the 'Element' reference. - * @see #setElement(Element) - * @see org.eclipse.papyrus.conversion.di2.Di2Package#getUml1SemanticModelBridge_Element() - * @model - * @generated - */ - Element getElement(); - - /** - * Sets the value of the ' - * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge#getElement - * Element}' reference. - * - * @param value - * the new value of the 'Element' reference. - * @see #getElement() - * @generated - */ - void setElement(Element value); - -} // Uml1SemanticModelBridge diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java deleted file mode 100644 index 7225744a610..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/CoreSemanticModelBridgeImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge; -import org.eclipse.papyrus.conversion.di2.Di2Package; - -/** - * An implementation of the model object ' - * Core Semantic Model Bridge'. - *

    - *

    - * - * @generated - */ -public class CoreSemanticModelBridgeImpl extends SemanticModelBridgeImpl implements CoreSemanticModelBridge { - - /** - * - * - * @generated - */ - protected CoreSemanticModelBridgeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.CORE_SEMANTIC_MODEL_BRIDGE; - } - -} // CoreSemanticModelBridgeImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java deleted file mode 100644 index 597ea47733e..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2FactoryImpl.java +++ /dev/null @@ -1,508 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -import org.eclipse.papyrus.conversion.di2.*; -import org.eclipse.swt.graphics.RGB; - -/** - * An implementation of the model Factory. - * - * @generated - */ -public class Di2FactoryImpl extends EFactoryImpl implements Di2Factory { - - /** - * Creates the default factory implementation. - * - * @generated - */ - public static Di2Factory init() { - try { - Di2Factory theDi2Factory = (Di2Factory) EPackage.Registry.INSTANCE.getEFactory("http://www.papyrusuml.org"); - if (theDi2Factory != null) { - return theDi2Factory; - } - } catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new Di2FactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * @generated - */ - public Di2FactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case Di2Package.DIAGRAM_ELEMENT: - return createDiagramElement(); - case Di2Package.GRAPH_ELEMENT: - return createGraphElement(); - case Di2Package.REFERENCE: - return createReference(); - case Di2Package.PROPERTY: - return createProperty(); - case Di2Package.GRAPH_EDGE: - return createGraphEdge(); - case Di2Package.GRAPH_CONNECTOR: - return createGraphConnector(); - case Di2Package.GRAPH_NODE: - return createGraphNode(); - case Di2Package.DIAGRAM_LINK: - return createDiagramLink(); - case Di2Package.DIAGRAM: - return createDiagram(); - case Di2Package.SEMANTIC_MODEL_BRIDGE: - return createSemanticModelBridge(); - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT: - return createSimpleSemanticModelElement(); - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE: - return createUml1SemanticModelBridge(); - case Di2Package.CORE_SEMANTIC_MODEL_BRIDGE: - return createCoreSemanticModelBridge(); - case Di2Package.LEAF_ELEMENT: - return createLeafElement(); - case Di2Package.TEXT_ELEMENT: - return createTextElement(); - case Di2Package.IMAGE: - return createImage(); - case Di2Package.GRAPHIC_PRIMITIVE: - return createGraphicPrimitive(); - case Di2Package.POLILYNE: - return createPolilyne(); - case Di2Package.ELLIPSE: - return createEllipse(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case Di2Package.PAPYRUS_KEY_ENUMERATION: - return createPapyrusKeyEnumerationFromString(eDataType, initialValue); - case Di2Package.POINT: - return createPointFromString(eDataType, initialValue); - case Di2Package.DIMENSION: - return createDimensionFromString(eDataType, initialValue); - case Di2Package.DOUBLE: - return createDoubleFromString(eDataType, initialValue); - case Di2Package.RGB: - return createRGBFromString(eDataType, initialValue); - case Di2Package.STRING: - return createStringFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case Di2Package.PAPYRUS_KEY_ENUMERATION: - return convertPapyrusKeyEnumerationToString(eDataType, instanceValue); - case Di2Package.POINT: - return convertPointToString(eDataType, instanceValue); - case Di2Package.DIMENSION: - return convertDimensionToString(eDataType, instanceValue); - case Di2Package.DOUBLE: - return convertDoubleToString(eDataType, instanceValue); - case Di2Package.RGB: - return convertRGBToString(eDataType, instanceValue); - case Di2Package.STRING: - return convertStringToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public DiagramElement createDiagramElement() { - DiagramElementImpl diagramElement = new DiagramElementImpl(); - return diagramElement; - } - - /** - * - * - * @generated - */ - public GraphElement createGraphElement() { - GraphElementImpl graphElement = new GraphElementImpl(); - return graphElement; - } - - /** - * - * - * @generated - */ - public Reference createReference() { - ReferenceImpl reference = new ReferenceImpl(); - return reference; - } - - /** - * - * - * @generated - */ - public Property createProperty() { - PropertyImpl property = new PropertyImpl(); - return property; - } - - /** - * - * - * @generated - */ - public GraphEdge createGraphEdge() { - GraphEdgeImpl graphEdge = new GraphEdgeImpl(); - return graphEdge; - } - - /** - * - * - * @generated - */ - public GraphConnector createGraphConnector() { - GraphConnectorImpl graphConnector = new GraphConnectorImpl(); - return graphConnector; - } - - /** - * - * - * @generated - */ - public GraphNode createGraphNode() { - GraphNodeImpl graphNode = new GraphNodeImpl(); - return graphNode; - } - - /** - * - * - * @generated - */ - public DiagramLink createDiagramLink() { - DiagramLinkImpl diagramLink = new DiagramLinkImpl(); - return diagramLink; - } - - /** - * - * - * @generated - */ - public Diagram createDiagram() { - DiagramImpl diagram = new DiagramImpl(); - return diagram; - } - - /** - * - * - * @generated - */ - public SemanticModelBridge createSemanticModelBridge() { - SemanticModelBridgeImpl semanticModelBridge = new SemanticModelBridgeImpl(); - return semanticModelBridge; - } - - /** - * - * - * @generated - */ - public SimpleSemanticModelElement createSimpleSemanticModelElement() { - SimpleSemanticModelElementImpl simpleSemanticModelElement = new SimpleSemanticModelElementImpl(); - return simpleSemanticModelElement; - } - - /** - * - * - * @generated - */ - public Uml1SemanticModelBridge createUml1SemanticModelBridge() { - Uml1SemanticModelBridgeImpl uml1SemanticModelBridge = new Uml1SemanticModelBridgeImpl(); - return uml1SemanticModelBridge; - } - - /** - * - * - * @generated - */ - public CoreSemanticModelBridge createCoreSemanticModelBridge() { - CoreSemanticModelBridgeImpl coreSemanticModelBridge = new CoreSemanticModelBridgeImpl(); - return coreSemanticModelBridge; - } - - /** - * - * - * @generated - */ - public LeafElement createLeafElement() { - LeafElementImpl leafElement = new LeafElementImpl(); - return leafElement; - } - - /** - * - * - * @generated - */ - public TextElement createTextElement() { - TextElementImpl textElement = new TextElementImpl(); - return textElement; - } - - /** - * - * - * @generated - */ - public Image createImage() { - ImageImpl image = new ImageImpl(); - return image; - } - - /** - * - * - * @generated - */ - public GraphicPrimitive createGraphicPrimitive() { - GraphicPrimitiveImpl graphicPrimitive = new GraphicPrimitiveImpl(); - return graphicPrimitive; - } - - /** - * - * - * @generated - */ - public Polilyne createPolilyne() { - PolilyneImpl polilyne = new PolilyneImpl(); - return polilyne; - } - - /** - * - * - * @generated - */ - public Ellipse createEllipse() { - EllipseImpl ellipse = new EllipseImpl(); - return ellipse; - } - - /** - * - * - * @generated - */ - public PapyrusKeyEnumeration createPapyrusKeyEnumerationFromString(EDataType eDataType, String initialValue) { - PapyrusKeyEnumeration result = PapyrusKeyEnumeration.get(initialValue); - if (result == null) - throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" - + eDataType.getName() + "'"); - return result; - } - - /** - * - * - * @generated - */ - public String convertPapyrusKeyEnumerationToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated NOT - */ - public Point createPointFromString(EDataType eDataType, String initialValue) { - // return (Point)super.createFromString(eDataType, initialValue); - if (initialValue == null) - return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); - return new Point(new Double(st.nextToken()).doubleValue(), new Double(st.nextToken()).doubleValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertPointToString(EDataType eDataType, Object instanceValue) { - // return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) - return null; - - return "" + ((Point) (instanceValue)).x + ":" + ((Point) (instanceValue)).y; - - } - - /** - * - * - * @generated NOT - */ - public Dimension createDimensionFromString(EDataType eDataType, String initialValue) { - // return (Dimension)super.createFromString(eDataType, initialValue); - if (initialValue == null) - return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); - return new Dimension(new Integer(st.nextToken()).intValue(), new Integer(st.nextToken()).intValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertDimensionToString(EDataType eDataType, Object instanceValue) { - // return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) - return null; - - return "" + ((Dimension) (instanceValue)).width + ":" + ((Dimension) (instanceValue)).height; - } - - /** - * - * - * @generated - */ - public Double createDoubleFromString(EDataType eDataType, String initialValue) { - return (Double) super.createFromString(eDataType, initialValue); - } - - /** - * - * - * @generated - */ - public String convertDoubleToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(eDataType, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public RGB createRGBFromString(EDataType eDataType, String initialValue) { - // return (RGB)super.createFromString(eDataType, initialValue); - if (initialValue == null) - return null; - java.util.StringTokenizer st = new java.util.StringTokenizer(initialValue, ":"); - return new RGB(new Integer(st.nextToken()).intValue(), new Integer(st.nextToken()).intValue(), new Integer(st - .nextToken()).intValue()); - } - - /** - * - * - * @generated NOT - */ - public String convertRGBToString(EDataType eDataType, Object instanceValue) { - // return super.convertToString(eDataType, instanceValue); - if (instanceValue == null) - return null; - - return "" + ((RGB) (instanceValue)).red + ":" + ((RGB) (instanceValue)).green + ":" - + ((RGB) (instanceValue)).blue; - } - - /** - * - * - * @generated - */ - public String createStringFromString(EDataType eDataType, String initialValue) { - return (String) super.createFromString(eDataType, initialValue); - } - - /** - * - * - * @generated - */ - public String convertStringToString(EDataType eDataType, Object instanceValue) { - return super.convertToString(eDataType, instanceValue); - } - - /** - * - * - * @generated - */ - public Di2Package getDi2Package() { - return (Di2Package) getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static Di2Package getPackage() { - return Di2Package.eINSTANCE; - } - -} // Di2FactoryImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java deleted file mode 100644 index 4241fa8b7d0..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Di2PackageImpl.java +++ /dev/null @@ -1,1436 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge; -import org.eclipse.papyrus.conversion.di2.Di2Factory; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Diagram; -import org.eclipse.papyrus.conversion.di2.DiagramElement; -import org.eclipse.papyrus.conversion.di2.DiagramLink; -import org.eclipse.papyrus.conversion.di2.Ellipse; -import org.eclipse.papyrus.conversion.di2.GraphConnector; -import org.eclipse.papyrus.conversion.di2.GraphEdge; -import org.eclipse.papyrus.conversion.di2.GraphElement; -import org.eclipse.papyrus.conversion.di2.GraphNode; -import org.eclipse.papyrus.conversion.di2.LeafElement; -import org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration; -import org.eclipse.papyrus.conversion.di2.Polilyne; -import org.eclipse.papyrus.conversion.di2.Reference; -import org.eclipse.papyrus.conversion.di2.TextElement; -import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * An implementation of the model Package. - * - * @generated - */ -public class Di2PackageImpl extends EPackageImpl implements Di2Package { - - /** - * - * - * @generated - */ - private EClass diagramElementEClass = null; - - /** - * - * - * @generated - */ - private EClass graphElementEClass = null; - - /** - * - * - * @generated - */ - private EClass referenceEClass = null; - - /** - * - * - * @generated - */ - private EClass propertyEClass = null; - - /** - * - * - * @generated - */ - private EClass graphEdgeEClass = null; - - /** - * - * - * @generated - */ - private EClass graphConnectorEClass = null; - - /** - * - * - * @generated - */ - private EClass graphNodeEClass = null; - - /** - * - * - * @generated - */ - private EClass diagramLinkEClass = null; - - /** - * - * - * @generated - */ - private EClass diagramEClass = null; - - /** - * - * - * @generated - */ - private EClass semanticModelBridgeEClass = null; - - /** - * - * - * @generated - */ - private EClass simpleSemanticModelElementEClass = null; - - /** - * - * - * @generated - */ - private EClass uml1SemanticModelBridgeEClass = null; - - /** - * - * - * @generated - */ - private EClass coreSemanticModelBridgeEClass = null; - - /** - * - * - * @generated - */ - private EClass leafElementEClass = null; - - /** - * - * - * @generated - */ - private EClass textElementEClass = null; - - /** - * - * - * @generated - */ - private EClass imageEClass = null; - - /** - * - * - * @generated - */ - private EClass graphicPrimitiveEClass = null; - - /** - * - * - * @generated - */ - private EClass polilyneEClass = null; - - /** - * - * - * @generated - */ - private EClass ellipseEClass = null; - - /** - * - * - * @generated - */ - private EEnum papyrusKeyEnumerationEEnum = null; - - /** - * - * - * @generated - */ - private EDataType pointEDataType = null; - - /** - * - * - * @generated - */ - private EDataType dimensionEDataType = null; - - /** - * - * - * @generated - */ - private EDataType doubleEDataType = null; - - /** - * - * - * @generated - */ - private EDataType rgbEDataType = null; - - /** - * - * - * @generated - */ - private EDataType stringEDataType = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI - * value. - *

    - * Note: the correct way to create the package is via the static factory method {@link #init - * init()}, which also performs initialization of the package, or returns the registered - * package, if one already exists. - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.papyrus.conversion.di2.Di2Package#eNS_URI - * @see #init() - * @generated - */ - private Di2PackageImpl() { - super(eNS_URI, Di2Factory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others - * upon which it depends. Simple dependencies are satisfied by calling this method on all - * dependent packages before doing anything else. This method drives initialization for - * interdependent packages directly, in parallel with this package, itself. - *

    - * Of this package and its interdependencies, all packages which have not yet been registered by - * their URI values are first created and registered. The packages are then initialized in two - * steps: meta-model objects for all of the packages are created before any are initialized, - * since one package's meta-model objects may refer to those of another. - *

    - * Invocation of this method will not affect any packages that have already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static Di2Package init() { - if (isInited) - return (Di2Package) EPackage.Registry.INSTANCE.getEPackage(Di2Package.eNS_URI); - - // Obtain or create and register package - Di2PackageImpl theDi2Package = (Di2PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Di2PackageImpl ? EPackage.Registry.INSTANCE - .getEPackage(eNS_URI) - : new Di2PackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackage.eINSTANCE.eClass(); - UMLPackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theDi2Package.createPackageContents(); - - // Initialize created meta-data - theDi2Package.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theDi2Package.freeze(); - - return theDi2Package; - } - - /** - * - * - * @generated - */ - public EClass getDiagramElement() { - return diagramElementEClass; - } - - /** - * - * - * @generated - */ - public EReference getDiagramElement_Property() { - return (EReference) diagramElementEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_IsVisible() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getDiagramElement_Reference() { - return (EReference) diagramElementEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getDiagramElement_Container() { - return (EReference) diagramElementEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_FontFamily() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_FontSize() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_LineStyle() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_LineThickness() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_FontColor() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_ForegroundColor() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_BackgroundColor() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(10); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_BorderColor() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(11); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramElement_Translucent() { - return (EAttribute) diagramElementEClass.getEStructuralFeatures().get(12); - } - - /** - * - * - * @generated - */ - public EReference getDiagramElement_SemanticParent() { - return (EReference) diagramElementEClass.getEStructuralFeatures().get(13); - } - - /** - * - * - * @generated - */ - public EReference getDiagramElement_SemanticChild() { - return (EReference) diagramElementEClass.getEStructuralFeatures().get(14); - } - - /** - * - * - * @generated - */ - public EClass getGraphElement() { - return graphElementEClass; - } - - /** - * - * - * @generated - */ - public EReference getGraphElement_Contained() { - return (EReference) graphElementEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGraphElement_Link() { - return (EReference) graphElementEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getGraphElement_SemanticModel() { - return (EReference) graphElementEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getGraphElement_Position() { - return (EAttribute) graphElementEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getGraphElement_Anchorage() { - return (EReference) graphElementEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getReference() { - return referenceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getReference_IsIndividualRepresentation() { - return (EAttribute) referenceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getReference_Referenced() { - return (EReference) referenceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getProperty() { - return propertyEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProperty_Key() { - return (EAttribute) propertyEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getProperty_Value() { - return (EAttribute) propertyEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getGraphEdge() { - return graphEdgeEClass; - } - - /** - * - * - * @generated - */ - public EReference getGraphEdge_Anchor() { - return (EReference) graphEdgeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getGraphEdge_Waypoints() { - return (EAttribute) graphEdgeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getGraphConnector() { - return graphConnectorEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getGraphConnector_Position() { - return (EAttribute) graphConnectorEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGraphConnector_GraphEdge() { - return (EReference) graphConnectorEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getGraphConnector_GraphElement() { - return (EReference) graphConnectorEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getGraphNode() { - return graphNodeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getGraphNode_Size() { - return (EAttribute) graphNodeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getDiagramLink() { - return diagramLinkEClass; - } - - /** - * - * - * @generated - */ - public EReference getDiagramLink_Diagram() { - return (EReference) diagramLinkEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramLink_Zoom() { - return (EAttribute) diagramLinkEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagramLink_Viewport() { - return (EAttribute) diagramLinkEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getDiagramLink_GraphElement() { - return (EReference) diagramLinkEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getDiagram() { - return diagramEClass; - } - - /** - * - * - * @generated - */ - public EReference getDiagram_Owner() { - return (EReference) diagramEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagram_Name() { - return (EAttribute) diagramEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagram_Zoom() { - return (EAttribute) diagramEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagram_Viewport() { - return (EAttribute) diagramEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getDiagram_DiagramLink() { - return (EReference) diagramEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getDiagram_Type() { - return (EAttribute) diagramEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EClass getSemanticModelBridge() { - return semanticModelBridgeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSemanticModelBridge_Presentation() { - return (EAttribute) semanticModelBridgeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSemanticModelBridge_GraphElement() { - return (EReference) semanticModelBridgeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getSimpleSemanticModelElement() { - return simpleSemanticModelElementEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSimpleSemanticModelElement_Typeinfo() { - return (EAttribute) simpleSemanticModelElementEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getUml1SemanticModelBridge() { - return uml1SemanticModelBridgeEClass; - } - - /** - * - * - * @generated - */ - public EReference getUml1SemanticModelBridge_Element() { - return (EReference) uml1SemanticModelBridgeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getCoreSemanticModelBridge() { - return coreSemanticModelBridgeEClass; - } - - /** - * - * - * @generated - */ - public EClass getLeafElement() { - return leafElementEClass; - } - - /** - * - * - * @generated - */ - public EClass getTextElement() { - return textElementEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getTextElement_Text() { - return (EAttribute) textElementEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getImage() { - return imageEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getImage_Uri() { - return (EAttribute) imageEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getImage_MimeType() { - return (EAttribute) imageEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getGraphicPrimitive() { - return graphicPrimitiveEClass; - } - - /** - * - * - * @generated - */ - public EClass getPolilyne() { - return polilyneEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPolilyne_Waypoints() { - return (EAttribute) polilyneEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getPolilyne_Closed() { - return (EAttribute) polilyneEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getEllipse() { - return ellipseEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_Center() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_RadiusX() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_RadiusY() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_Rotation() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_StartAngle() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getEllipse_EndAngle() { - return (EAttribute) ellipseEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EEnum getPapyrusKeyEnumeration() { - return papyrusKeyEnumerationEEnum; - } - - /** - * - * - * @generated - */ - public EDataType getPoint() { - return pointEDataType; - } - - /** - * - * - * @generated - */ - public EDataType getDimension() { - return dimensionEDataType; - } - - /** - * - * - * @generated - */ - public EDataType getDouble() { - return doubleEDataType; - } - - /** - * - * - * @generated - */ - public EDataType getRGB() { - return rgbEDataType; - } - - /** - * - * - * @generated - */ - public EDataType getString() { - return stringEDataType; - } - - /** - * - * - * @generated - */ - public Di2Factory getDi2Factory() { - return (Di2Factory) getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is guarded to have no affect on - * any invocation but its first. - * - * @generated - */ - public void createPackageContents() { - if (isCreated) - return; - isCreated = true; - - // Create classes and their features - diagramElementEClass = createEClass(DIAGRAM_ELEMENT); - createEReference(diagramElementEClass, DIAGRAM_ELEMENT__PROPERTY); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__IS_VISIBLE); - createEReference(diagramElementEClass, DIAGRAM_ELEMENT__REFERENCE); - createEReference(diagramElementEClass, DIAGRAM_ELEMENT__CONTAINER); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_FAMILY); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_SIZE); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__LINE_STYLE); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__LINE_THICKNESS); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FONT_COLOR); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__FOREGROUND_COLOR); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__BACKGROUND_COLOR); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__BORDER_COLOR); - createEAttribute(diagramElementEClass, DIAGRAM_ELEMENT__TRANSLUCENT); - createEReference(diagramElementEClass, DIAGRAM_ELEMENT__SEMANTIC_PARENT); - createEReference(diagramElementEClass, DIAGRAM_ELEMENT__SEMANTIC_CHILD); - - graphElementEClass = createEClass(GRAPH_ELEMENT); - createEReference(graphElementEClass, GRAPH_ELEMENT__CONTAINED); - createEReference(graphElementEClass, GRAPH_ELEMENT__LINK); - createEReference(graphElementEClass, GRAPH_ELEMENT__SEMANTIC_MODEL); - createEAttribute(graphElementEClass, GRAPH_ELEMENT__POSITION); - createEReference(graphElementEClass, GRAPH_ELEMENT__ANCHORAGE); - - referenceEClass = createEClass(REFERENCE); - createEAttribute(referenceEClass, REFERENCE__IS_INDIVIDUAL_REPRESENTATION); - createEReference(referenceEClass, REFERENCE__REFERENCED); - - propertyEClass = createEClass(PROPERTY); - createEAttribute(propertyEClass, PROPERTY__KEY); - createEAttribute(propertyEClass, PROPERTY__VALUE); - - graphEdgeEClass = createEClass(GRAPH_EDGE); - createEReference(graphEdgeEClass, GRAPH_EDGE__ANCHOR); - createEAttribute(graphEdgeEClass, GRAPH_EDGE__WAYPOINTS); - - graphConnectorEClass = createEClass(GRAPH_CONNECTOR); - createEAttribute(graphConnectorEClass, GRAPH_CONNECTOR__POSITION); - createEReference(graphConnectorEClass, GRAPH_CONNECTOR__GRAPH_EDGE); - createEReference(graphConnectorEClass, GRAPH_CONNECTOR__GRAPH_ELEMENT); - - graphNodeEClass = createEClass(GRAPH_NODE); - createEAttribute(graphNodeEClass, GRAPH_NODE__SIZE); - - diagramLinkEClass = createEClass(DIAGRAM_LINK); - createEReference(diagramLinkEClass, DIAGRAM_LINK__DIAGRAM); - createEAttribute(diagramLinkEClass, DIAGRAM_LINK__ZOOM); - createEAttribute(diagramLinkEClass, DIAGRAM_LINK__VIEWPORT); - createEReference(diagramLinkEClass, DIAGRAM_LINK__GRAPH_ELEMENT); - - diagramEClass = createEClass(DIAGRAM); - createEReference(diagramEClass, DIAGRAM__OWNER); - createEAttribute(diagramEClass, DIAGRAM__NAME); - createEAttribute(diagramEClass, DIAGRAM__ZOOM); - createEAttribute(diagramEClass, DIAGRAM__VIEWPORT); - createEReference(diagramEClass, DIAGRAM__DIAGRAM_LINK); - createEAttribute(diagramEClass, DIAGRAM__TYPE); - - semanticModelBridgeEClass = createEClass(SEMANTIC_MODEL_BRIDGE); - createEAttribute(semanticModelBridgeEClass, SEMANTIC_MODEL_BRIDGE__PRESENTATION); - createEReference(semanticModelBridgeEClass, SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT); - - simpleSemanticModelElementEClass = createEClass(SIMPLE_SEMANTIC_MODEL_ELEMENT); - createEAttribute(simpleSemanticModelElementEClass, SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO); - - uml1SemanticModelBridgeEClass = createEClass(UML1_SEMANTIC_MODEL_BRIDGE); - createEReference(uml1SemanticModelBridgeEClass, UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT); - - coreSemanticModelBridgeEClass = createEClass(CORE_SEMANTIC_MODEL_BRIDGE); - - leafElementEClass = createEClass(LEAF_ELEMENT); - - textElementEClass = createEClass(TEXT_ELEMENT); - createEAttribute(textElementEClass, TEXT_ELEMENT__TEXT); - - imageEClass = createEClass(IMAGE); - createEAttribute(imageEClass, IMAGE__URI); - createEAttribute(imageEClass, IMAGE__MIME_TYPE); - - graphicPrimitiveEClass = createEClass(GRAPHIC_PRIMITIVE); - - polilyneEClass = createEClass(POLILYNE); - createEAttribute(polilyneEClass, POLILYNE__WAYPOINTS); - createEAttribute(polilyneEClass, POLILYNE__CLOSED); - - ellipseEClass = createEClass(ELLIPSE); - createEAttribute(ellipseEClass, ELLIPSE__CENTER); - createEAttribute(ellipseEClass, ELLIPSE__RADIUS_X); - createEAttribute(ellipseEClass, ELLIPSE__RADIUS_Y); - createEAttribute(ellipseEClass, ELLIPSE__ROTATION); - createEAttribute(ellipseEClass, ELLIPSE__START_ANGLE); - createEAttribute(ellipseEClass, ELLIPSE__END_ANGLE); - - // Create enums - papyrusKeyEnumerationEEnum = createEEnum(PAPYRUS_KEY_ENUMERATION); - - // Create data types - pointEDataType = createEDataType(POINT); - dimensionEDataType = createEDataType(DIMENSION); - doubleEDataType = createEDataType(DOUBLE); - rgbEDataType = createEDataType(RGB); - stringEDataType = createEDataType(STRING); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This method is guarded to have - * no affect on any invocation but its first. - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) - return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - graphElementEClass.getESuperTypes().add(this.getDiagramElement()); - referenceEClass.getESuperTypes().add(this.getDiagramElement()); - graphEdgeEClass.getESuperTypes().add(this.getGraphElement()); - graphNodeEClass.getESuperTypes().add(this.getGraphElement()); - diagramEClass.getESuperTypes().add(this.getGraphNode()); - simpleSemanticModelElementEClass.getESuperTypes().add(this.getSemanticModelBridge()); - uml1SemanticModelBridgeEClass.getESuperTypes().add(this.getSemanticModelBridge()); - coreSemanticModelBridgeEClass.getESuperTypes().add(this.getSemanticModelBridge()); - leafElementEClass.getESuperTypes().add(this.getDiagramElement()); - textElementEClass.getESuperTypes().add(this.getLeafElement()); - imageEClass.getESuperTypes().add(this.getLeafElement()); - graphicPrimitiveEClass.getESuperTypes().add(this.getLeafElement()); - polilyneEClass.getESuperTypes().add(this.getGraphicPrimitive()); - ellipseEClass.getESuperTypes().add(this.getGraphicPrimitive()); - - // Initialize classes and features; add operations and parameters - initEClass(diagramElementEClass, DiagramElement.class, "DiagramElement", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEReference(getDiagramElement_Property(), this.getProperty(), null, "property", null, 0, -1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - /* - initEAttribute(getDiagramElement_IsVisible(), theUMLPackage.getBoolean(), "isVisible", null, 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - */ - initEReference(getDiagramElement_Reference(), this.getReference(), null, "reference", null, 0, -1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDiagramElement_Container(), this.getGraphElement(), this.getGraphElement_Contained(), - "container", null, 0, 1, DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, - !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - /* - initEAttribute(getDiagramElement_FontFamily(), theUMLPackage.getString(), "fontFamily", "", 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_FontSize(), theUMLPackage.getInteger(), "fontSize", "10", 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_LineStyle(), theUMLPackage.getString(), "lineStyle", "", 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_LineThickness(), theUMLPackage.getInteger(), "lineThickness", "1", 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - */ - initEAttribute(getDiagramElement_FontColor(), this.getRGB(), "fontColor", null, 0, 1, DiagramElement.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_ForegroundColor(), this.getRGB(), "foregroundColor", null, 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_BackgroundColor(), this.getRGB(), "backgroundColor", null, 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramElement_BorderColor(), this.getRGB(), "borderColor", null, 0, 1, DiagramElement.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - /* - initEAttribute(getDiagramElement_Translucent(), theUMLPackage.getBoolean(), "translucent", null, 0, 1, - DiagramElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - */ - initEReference(getDiagramElement_SemanticParent(), this.getDiagramElement(), this - .getDiagramElement_SemanticChild(), "semanticParent", null, 0, 1, DiagramElement.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEReference(getDiagramElement_SemanticChild(), this.getDiagramElement(), this - .getDiagramElement_SemanticParent(), "semanticChild", null, 0, -1, DiagramElement.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - - EOperation op = addEOperation(diagramElementEClass, this.getProperty(), "getProperty", 0, 1, IS_UNIQUE, - IS_ORDERED); - /* - addEParameter(op, theUMLPackage.getString(), "key", 0, 1, IS_UNIQUE, IS_ORDERED); - - op = addEOperation(diagramElementEClass, this.getString(), "getPropertyValue", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, theUMLPackage.getString(), "key", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(diagramElementEClass, theUMLPackage.getString(), "getEditpartName", 0, 1, IS_UNIQUE, IS_ORDERED); - */ - initEClass(graphElementEClass, GraphElement.class, "GraphElement", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEReference(getGraphElement_Contained(), this.getDiagramElement(), this.getDiagramElement_Container(), - "contained", null, 0, -1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphElement_Link(), this.getDiagramLink(), null, "link", null, 0, -1, GraphElement.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphElement_SemanticModel(), this.getSemanticModelBridge(), null, "semanticModel", null, 0, - 1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getGraphElement_Position(), this.getPoint(), "position", null, 0, 1, GraphElement.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphElement_Anchorage(), this.getGraphConnector(), this.getGraphConnector_GraphElement(), - "anchorage", null, 0, -1, GraphElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, - !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(referenceEClass, Reference.class, "Reference", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - /* - initEAttribute(getReference_IsIndividualRepresentation(), theUMLPackage.getBoolean(), - "isIndividualRepresentation", null, 0, 1, Reference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, - !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getReference_Referenced(), this.getDiagramElement(), null, "referenced", null, 1, 1, - Reference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProperty_Key(), theUMLPackage.getString(), "key", null, 0, 1, Property.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Value(), theUMLPackage.getString(), "value", null, 0, 1, Property.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - */ - initEClass(graphEdgeEClass, GraphEdge.class, "GraphEdge", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEReference(getGraphEdge_Anchor(), this.getGraphConnector(), this.getGraphConnector_GraphEdge(), "anchor", - null, 0, 2, GraphEdge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getGraphEdge_Waypoints(), this.getPoint(), "waypoints", "", 0, -1, GraphEdge.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - addEOperation(graphEdgeEClass, this.getGraphElement(), "getAnchorSource", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(graphEdgeEClass, this.getGraphElement(), "getAnchorTarget", 0, 1, IS_UNIQUE, IS_ORDERED); - - op = addEOperation(graphEdgeEClass, null, "setAnchorSource", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, this.getGraphElement(), "value", 0, 1, IS_UNIQUE, IS_ORDERED); - - op = addEOperation(graphEdgeEClass, null, "setAnchorTarget", 0, 1, IS_UNIQUE, IS_ORDERED); - addEParameter(op, this.getGraphElement(), "value", 0, 1, IS_UNIQUE, IS_ORDERED); - - addEOperation(graphEdgeEClass, null, "initConnectors", 0, 1, IS_UNIQUE, IS_ORDERED); - - initEClass(graphConnectorEClass, GraphConnector.class, "GraphConnector", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getGraphConnector_Position(), this.getPoint(), "position", null, 0, 1, GraphConnector.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphConnector_GraphEdge(), this.getGraphEdge(), this.getGraphEdge_Anchor(), "graphEdge", - null, 0, -1, GraphConnector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphConnector_GraphElement(), this.getGraphElement(), this.getGraphElement_Anchorage(), - "graphElement", null, 1, 1, GraphConnector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, - !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(graphNodeEClass, GraphNode.class, "GraphNode", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getGraphNode_Size(), this.getDimension(), "size", null, 0, 1, GraphNode.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(diagramLinkEClass, DiagramLink.class, "DiagramLink", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEReference(getDiagramLink_Diagram(), this.getDiagram(), null, "diagram", null, 1, 1, DiagramLink.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramLink_Zoom(), this.getDouble(), "zoom", null, 0, 1, DiagramLink.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagramLink_Viewport(), this.getPoint(), "viewport", null, 0, 1, DiagramLink.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDiagramLink_GraphElement(), this.getGraphElement(), null, "graphElement", null, 1, 1, - DiagramLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(diagramEClass, Diagram.class, "Diagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getDiagram_Owner(), this.getSemanticModelBridge(), null, "owner", null, 1, 1, Diagram.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - /* - initEAttribute(getDiagram_Name(), theUMLPackage.getString(), "name", null, 0, 1, Diagram.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagram_Zoom(), this.getDouble(), "zoom", null, 0, 1, Diagram.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagram_Viewport(), this.getPoint(), "viewport", null, 0, 1, Diagram.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDiagram_DiagramLink(), this.getDiagramLink(), null, "diagramLink", null, 0, -1, - Diagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDiagram_Type(), theUMLPackage.getString(), "type", null, 0, 1, Diagram.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(semanticModelBridgeEClass, SemanticModelBridge.class, "SemanticModelBridge", !IS_ABSTRACT, - !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSemanticModelBridge_Presentation(), theUMLPackage.getString(), "presentation", null, 0, 1, - SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSemanticModelBridge_GraphElement(), this.getGraphElement(), null, "graphElement", null, 0, 1, - SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(simpleSemanticModelElementEClass, SimpleSemanticModelElement.class, "SimpleSemanticModelElement", - !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSimpleSemanticModelElement_Typeinfo(), theUMLPackage.getString(), "typeinfo", null, 0, 1, - SimpleSemanticModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - */ - - initEClass(uml1SemanticModelBridgeEClass, Uml1SemanticModelBridge.class, "Uml1SemanticModelBridge", - !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getUml1SemanticModelBridge_Element(), theUMLPackage.getElement(), null, "element", null, 0, 1, - Uml1SemanticModelBridge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(coreSemanticModelBridgeEClass, CoreSemanticModelBridge.class, "CoreSemanticModelBridge", - !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(leafElementEClass, LeafElement.class, "LeafElement", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - - initEClass(textElementEClass, TextElement.class, "TextElement", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - /* - initEAttribute(getTextElement_Text(), theUMLPackage.getString(), "text", null, 0, 1, TextElement.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getImage_Uri(), theUMLPackage.getString(), "uri", null, 0, 1, Image.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getImage_MimeType(), theUMLPackage.getString(), "mimeType", null, 0, 1, Image.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(graphicPrimitiveEClass, GraphicPrimitive.class, "GraphicPrimitive", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - */ - initEClass(polilyneEClass, Polilyne.class, "Polilyne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPolilyne_Waypoints(), this.getPoint(), "waypoints", null, 2, -1, Polilyne.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - /* - initEAttribute(getPolilyne_Closed(), theUMLPackage.getBoolean(), "closed", null, 2, -1, Polilyne.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - */ - - initEClass(ellipseEClass, Ellipse.class, "Ellipse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getEllipse_Center(), this.getPoint(), "center", null, 0, 1, Ellipse.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEllipse_RadiusX(), this.getDouble(), "radiusX", null, 0, 1, Ellipse.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEllipse_RadiusY(), this.getDouble(), "radiusY", null, 0, 1, Ellipse.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEllipse_Rotation(), this.getDouble(), "rotation", null, 0, 1, Ellipse.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEllipse_StartAngle(), this.getDouble(), "startAngle", null, 0, 1, Ellipse.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getEllipse_EndAngle(), this.getDouble(), "endAngle", null, 0, 1, Ellipse.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(papyrusKeyEnumerationEEnum, PapyrusKeyEnumeration.class, "PapyrusKeyEnumeration"); - addEEnumLiteral(papyrusKeyEnumerationEEnum, PapyrusKeyEnumeration.PAPYRUSEDITPART); - - // Initialize data types - initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(dimensionEDataType, Dimension.class, "Dimension", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(doubleEDataType, double.class, "Double", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(rgbEDataType, org.eclipse.swt.graphics.RGB.class, "RGB", IS_SERIALIZABLE, - !IS_GENERATED_INSTANCE_CLASS); - initEDataType(stringEDataType, String.class, "String", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - } - -} // Di2PackageImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java deleted file mode 100644 index c5460ff05e4..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramElementImpl.java +++ /dev/null @@ -1,1048 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.DiagramElement; -import org.eclipse.papyrus.conversion.di2.GraphElement; -import org.eclipse.papyrus.conversion.di2.Property; -import org.eclipse.papyrus.conversion.di2.Reference; -import org.eclipse.swt.graphics.RGB; - -/** - * An implementation of the model object 'Diagram Element'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getProperty - * Property}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#isIsVisible Is - * Visible}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getReference - * Reference}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getContainer - * Container}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontFamily Font - * Family}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontSize Font - * Size}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getLineStyle Line - * Style}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getLineThickness - * Line Thickness}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getFontColor Font - * Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getForegroundColor - * Foreground Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getBackgroundColor - * Background Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getBorderColor - * Border Color}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#isTranslucent - * Translucent}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getSemanticParent - * Semantic Parent}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramElementImpl#getSemanticChild - * Semantic Child}
    • - *
    - *

    - * - * @generated - */ -public class DiagramElementImpl extends EObjectImpl implements DiagramElement { - - /** - * The cached value of the '{@link #getProperty() Property}' containment reference - * list. - * - * @see #getProperty() - * @generated - * @ordered - */ - protected EList property; - - /** - * The default value of the '{@link #isIsVisible() Is Visible}' attribute. - * - * @see #isIsVisible() - * @generated - * @ordered - */ - protected static final boolean IS_VISIBLE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isIsVisible() Is Visible}' attribute. - * - * @see #isIsVisible() - * @generated - * @ordered - */ - protected boolean isVisible = IS_VISIBLE_EDEFAULT; - - /** - * The cached value of the '{@link #getReference() Reference}' reference list. - * - * @see #getReference() - * @generated - * @ordered - */ - protected EList reference; - - /** - * The default value of the '{@link #getFontFamily() Font Family}' attribute. - * - * @see #getFontFamily() - * @generated - * @ordered - */ - protected static final String FONT_FAMILY_EDEFAULT = ""; - - /** - * The cached value of the '{@link #getFontFamily() Font Family}' attribute. - * - * @see #getFontFamily() - * @generated - * @ordered - */ - protected String fontFamily = FONT_FAMILY_EDEFAULT; - - /** - * The default value of the '{@link #getFontSize() Font Size}' attribute. - * - * @see #getFontSize() - * @generated - * @ordered - */ - protected static final int FONT_SIZE_EDEFAULT = 10; - - /** - * The cached value of the '{@link #getFontSize() Font Size}' attribute. - * - * @see #getFontSize() - * @generated - * @ordered - */ - protected int fontSize = FONT_SIZE_EDEFAULT; - - /** - * The default value of the '{@link #getLineStyle() Line Style}' attribute. - * - * @see #getLineStyle() - * @generated - * @ordered - */ - protected static final String LINE_STYLE_EDEFAULT = ""; - - /** - * The cached value of the '{@link #getLineStyle() Line Style}' attribute. - * - * @see #getLineStyle() - * @generated - * @ordered - */ - protected String lineStyle = LINE_STYLE_EDEFAULT; - - /** - * The default value of the '{@link #getLineThickness() Line Thickness}' attribute. - * - * - * @see #getLineThickness() - * @generated - * @ordered - */ - protected static final int LINE_THICKNESS_EDEFAULT = 1; - - /** - * The cached value of the '{@link #getLineThickness() Line Thickness}' attribute. - * - * @see #getLineThickness() - * @generated - * @ordered - */ - protected int lineThickness = LINE_THICKNESS_EDEFAULT; - - /** - * The default value of the '{@link #getFontColor() Font Color}' attribute. - * - * @see #getFontColor() - * @generated - * @ordered - */ - protected static final RGB FONT_COLOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getFontColor() Font Color}' attribute. - * - * @see #getFontColor() - * @generated - * @ordered - */ - protected RGB fontColor = FONT_COLOR_EDEFAULT; - - /** - * The default value of the '{@link #getForegroundColor() Foreground Color}' attribute. - * - * - * @see #getForegroundColor() - * @generated - * @ordered - */ - protected static final RGB FOREGROUND_COLOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getForegroundColor() Foreground Color}' attribute. - * - * - * @see #getForegroundColor() - * @generated - * @ordered - */ - protected RGB foregroundColor = FOREGROUND_COLOR_EDEFAULT; - - /** - * The default value of the '{@link #getBackgroundColor() Background Color}' attribute. - * - * - * @see #getBackgroundColor() - * @generated - * @ordered - */ - protected static final RGB BACKGROUND_COLOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getBackgroundColor() Background Color}' attribute. - * - * - * @see #getBackgroundColor() - * @generated - * @ordered - */ - protected RGB backgroundColor = BACKGROUND_COLOR_EDEFAULT; - - /** - * The default value of the '{@link #getBorderColor() Border Color}' attribute. - * - * @see #getBorderColor() - * @generated - * @ordered - */ - protected static final RGB BORDER_COLOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getBorderColor() Border Color}' attribute. - * - * @see #getBorderColor() - * @generated - * @ordered - */ - protected RGB borderColor = BORDER_COLOR_EDEFAULT; - - /** - * The default value of the '{@link #isTranslucent() Translucent}' attribute. - * - * @see #isTranslucent() - * @generated - * @ordered - */ - protected static final boolean TRANSLUCENT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isTranslucent() Translucent}' attribute. - * - * @see #isTranslucent() - * @generated - * @ordered - */ - protected boolean translucent = TRANSLUCENT_EDEFAULT; - - /** - * The cached value of the '{@link #getSemanticParent() Semantic Parent}' reference. - * - * - * @see #getSemanticParent() - * @generated - * @ordered - */ - protected DiagramElement semanticParent; - - /** - * The cached value of the '{@link #getSemanticChild() Semantic Child}' reference list. - * - * - * @see #getSemanticChild() - * @generated - * @ordered - */ - protected EList semanticChild; - - /** - * - * - * @generated - */ - protected DiagramElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.DIAGRAM_ELEMENT; - } - - /** - * - * - * @generated - */ - public EList getProperty() { - if (property == null) { - property = new EObjectContainmentEList(Property.class, this, Di2Package.DIAGRAM_ELEMENT__PROPERTY); - } - return property; - } - - /** - * - * - * @generated - */ - public boolean isIsVisible() { - return isVisible; - } - - /** - * - * - * @generated - */ - public void setIsVisible(boolean newIsVisible) { - boolean oldIsVisible = isVisible; - isVisible = newIsVisible; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE, oldIsVisible, - isVisible)); - } - - /** - * - * - * @generated - */ - public EList getReference() { - if (reference == null) { - reference = new EObjectResolvingEList(Reference.class, this, - Di2Package.DIAGRAM_ELEMENT__REFERENCE); - } - return reference; - } - - /** - * - * - * @generated - */ - public GraphElement getContainer() { - if (eContainerFeatureID != Di2Package.DIAGRAM_ELEMENT__CONTAINER) - return null; - return (GraphElement) eContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetContainer(GraphElement newContainer, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject) newContainer, Di2Package.DIAGRAM_ELEMENT__CONTAINER, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setContainer(GraphElement newContainer) { - if (newContainer != eInternalContainer() - || (eContainerFeatureID != Di2Package.DIAGRAM_ELEMENT__CONTAINER && newContainer != null)) { - if (EcoreUtil.isAncestor(this, newContainer)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newContainer != null) - msgs = ((InternalEObject) newContainer).eInverseAdd(this, Di2Package.GRAPH_ELEMENT__CONTAINED, - GraphElement.class, msgs); - msgs = basicSetContainer(newContainer, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__CONTAINER, newContainer, - newContainer)); - } - - /** - * - * - * @generated - */ - public String getFontFamily() { - return fontFamily; - } - - /** - * - * - * @generated - */ - public void setFontFamily(String newFontFamily) { - String oldFontFamily = fontFamily; - fontFamily = newFontFamily; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY, - oldFontFamily, fontFamily)); - } - - /** - * - * - * @generated - */ - public int getFontSize() { - return fontSize; - } - - /** - * - * - * @generated - */ - public void setFontSize(int newFontSize) { - int oldFontSize = fontSize; - fontSize = newFontSize; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_SIZE, oldFontSize, - fontSize)); - } - - /** - * - * - * @generated - */ - public String getLineStyle() { - return lineStyle; - } - - /** - * - * - * @generated - */ - public void setLineStyle(String newLineStyle) { - String oldLineStyle = lineStyle; - lineStyle = newLineStyle; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__LINE_STYLE, oldLineStyle, - lineStyle)); - } - - /** - * - * - * @generated - */ - public int getLineThickness() { - return lineThickness; - } - - /** - * - * - * @generated - */ - public void setLineThickness(int newLineThickness) { - int oldLineThickness = lineThickness; - lineThickness = newLineThickness; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS, - oldLineThickness, lineThickness)); - } - - /** - * - * - * @generated - */ - public RGB getFontColor() { - return fontColor; - } - - /** - * - * - * @generated - */ - public void setFontColor(RGB newFontColor) { - RGB oldFontColor = fontColor; - fontColor = newFontColor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FONT_COLOR, oldFontColor, - fontColor)); - } - - /** - * - * - * @generated - */ - public RGB getForegroundColor() { - return foregroundColor; - } - - /** - * - * - * @generated - */ - public void setForegroundColor(RGB newForegroundColor) { - RGB oldForegroundColor = foregroundColor; - foregroundColor = newForegroundColor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR, - oldForegroundColor, foregroundColor)); - } - - /** - * - * - * @generated - */ - public RGB getBackgroundColor() { - return backgroundColor; - } - - /** - * - * - * @generated - */ - public void setBackgroundColor(RGB newBackgroundColor) { - RGB oldBackgroundColor = backgroundColor; - backgroundColor = newBackgroundColor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR, - oldBackgroundColor, backgroundColor)); - } - - /** - * - * - * @generated - */ - public RGB getBorderColor() { - return borderColor; - } - - /** - * - * - * @generated - */ - public void setBorderColor(RGB newBorderColor) { - RGB oldBorderColor = borderColor; - borderColor = newBorderColor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR, - oldBorderColor, borderColor)); - } - - /** - * - * - * @generated - */ - public boolean isTranslucent() { - return translucent; - } - - /** - * - * - * @generated - */ - public void setTranslucent(boolean newTranslucent) { - boolean oldTranslucent = translucent; - translucent = newTranslucent; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT, - oldTranslucent, translucent)); - } - - /** - * - * - * @generated - */ - public DiagramElement getSemanticParent() { - if (semanticParent != null && semanticParent.eIsProxy()) { - InternalEObject oldSemanticParent = (InternalEObject) semanticParent; - semanticParent = (DiagramElement) eResolveProxy(oldSemanticParent); - if (semanticParent != oldSemanticParent) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, oldSemanticParent, semanticParent)); - } - } - return semanticParent; - } - - /** - * - * - * @generated - */ - public DiagramElement basicGetSemanticParent() { - return semanticParent; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSemanticParent(DiagramElement newSemanticParent, NotificationChain msgs) { - DiagramElement oldSemanticParent = semanticParent; - semanticParent = newSemanticParent; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, oldSemanticParent, newSemanticParent); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSemanticParent(DiagramElement newSemanticParent) { - if (newSemanticParent != semanticParent) { - NotificationChain msgs = null; - if (semanticParent != null) - msgs = ((InternalEObject) semanticParent).eInverseRemove(this, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); - if (newSemanticParent != null) - msgs = ((InternalEObject) newSemanticParent).eInverseAdd(this, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); - msgs = basicSetSemanticParent(newSemanticParent, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT, - newSemanticParent, newSemanticParent)); - } - - /** - * - * - * @generated - */ - public EList getSemanticChild() { - if (semanticChild == null) { - semanticChild = new EObjectWithInverseResolvingEList(DiagramElement.class, this, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT); - } - return semanticChild; - } - - /** - * - * - * @generated - */ - public Property getProperty(String key) { - java.util.Iterator it = getProperty().iterator(); - while (it.hasNext()) { - Property element = (Property) it.next(); - if (key.equals(element.getKey())) { - return element; - } - } - return null; - } - - /** - * - * - * @generated - */ - public String getPropertyValue(String key) { - if (this.getProperty(key) != null) { - return this.getProperty(key).getValue(); - } - return null; - - } - - /** - * - * - * @generated - */ - public String getEditpartName() { - return this.getPropertyValue(org.eclipse.papyrus.conversion.di2.PapyrusKeyEnumeration.PAPYRUSEDITPART - .getLiteral()); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetContainer((GraphElement) otherEnd, msgs); - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - if (semanticParent != null) - msgs = ((InternalEObject) semanticParent).eInverseRemove(this, - Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD, DiagramElement.class, msgs); - return basicSetSemanticParent((DiagramElement) otherEnd, msgs); - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - return ((InternalEList) (InternalEList) getSemanticChild()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__PROPERTY: - return ((InternalEList) getProperty()).basicRemove(otherEnd, msgs); - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - return basicSetContainer(null, msgs); - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - return basicSetSemanticParent(null, msgs); - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - return ((InternalEList) getSemanticChild()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID) { - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - return eInternalContainer().eInverseRemove(this, Di2Package.GRAPH_ELEMENT__CONTAINED, GraphElement.class, - msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__PROPERTY: - return getProperty(); - case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: - return isIsVisible() ? Boolean.TRUE : Boolean.FALSE; - case Di2Package.DIAGRAM_ELEMENT__REFERENCE: - return getReference(); - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - return getContainer(); - case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: - return getFontFamily(); - case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: - return new Integer(getFontSize()); - case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: - return getLineStyle(); - case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: - return new Integer(getLineThickness()); - case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: - return getFontColor(); - case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: - return getForegroundColor(); - case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: - return getBackgroundColor(); - case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: - return getBorderColor(); - case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: - return isTranslucent() ? Boolean.TRUE : Boolean.FALSE; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - if (resolve) - return getSemanticParent(); - return basicGetSemanticParent(); - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - return getSemanticChild(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__PROPERTY: - getProperty().clear(); - getProperty().addAll((Collection) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: - setIsVisible(((Boolean) newValue).booleanValue()); - return; - case Di2Package.DIAGRAM_ELEMENT__REFERENCE: - getReference().clear(); - getReference().addAll((Collection) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - setContainer((GraphElement) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: - setFontFamily((String) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: - setFontSize(((Integer) newValue).intValue()); - return; - case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: - setLineStyle((String) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: - setLineThickness(((Integer) newValue).intValue()); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: - setFontColor((RGB) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: - setForegroundColor((RGB) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: - setBackgroundColor((RGB) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: - setBorderColor((RGB) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: - setTranslucent(((Boolean) newValue).booleanValue()); - return; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - setSemanticParent((DiagramElement) newValue); - return; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - getSemanticChild().clear(); - getSemanticChild().addAll((Collection) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__PROPERTY: - getProperty().clear(); - return; - case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: - setIsVisible(IS_VISIBLE_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__REFERENCE: - getReference().clear(); - return; - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - setContainer((GraphElement) null); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: - setFontFamily(FONT_FAMILY_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: - setFontSize(FONT_SIZE_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: - setLineStyle(LINE_STYLE_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: - setLineThickness(LINE_THICKNESS_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: - setFontColor(FONT_COLOR_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: - setForegroundColor(FOREGROUND_COLOR_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: - setBackgroundColor(BACKGROUND_COLOR_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: - setBorderColor(BORDER_COLOR_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: - setTranslucent(TRANSLUCENT_EDEFAULT); - return; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - setSemanticParent((DiagramElement) null); - return; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - getSemanticChild().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM_ELEMENT__PROPERTY: - return property != null && !property.isEmpty(); - case Di2Package.DIAGRAM_ELEMENT__IS_VISIBLE: - return isVisible != IS_VISIBLE_EDEFAULT; - case Di2Package.DIAGRAM_ELEMENT__REFERENCE: - return reference != null && !reference.isEmpty(); - case Di2Package.DIAGRAM_ELEMENT__CONTAINER: - return getContainer() != null; - case Di2Package.DIAGRAM_ELEMENT__FONT_FAMILY: - return FONT_FAMILY_EDEFAULT == null ? fontFamily != null : !FONT_FAMILY_EDEFAULT.equals(fontFamily); - case Di2Package.DIAGRAM_ELEMENT__FONT_SIZE: - return fontSize != FONT_SIZE_EDEFAULT; - case Di2Package.DIAGRAM_ELEMENT__LINE_STYLE: - return LINE_STYLE_EDEFAULT == null ? lineStyle != null : !LINE_STYLE_EDEFAULT.equals(lineStyle); - case Di2Package.DIAGRAM_ELEMENT__LINE_THICKNESS: - return lineThickness != LINE_THICKNESS_EDEFAULT; - case Di2Package.DIAGRAM_ELEMENT__FONT_COLOR: - return FONT_COLOR_EDEFAULT == null ? fontColor != null : !FONT_COLOR_EDEFAULT.equals(fontColor); - case Di2Package.DIAGRAM_ELEMENT__FOREGROUND_COLOR: - return FOREGROUND_COLOR_EDEFAULT == null ? foregroundColor != null : !FOREGROUND_COLOR_EDEFAULT - .equals(foregroundColor); - case Di2Package.DIAGRAM_ELEMENT__BACKGROUND_COLOR: - return BACKGROUND_COLOR_EDEFAULT == null ? backgroundColor != null : !BACKGROUND_COLOR_EDEFAULT - .equals(backgroundColor); - case Di2Package.DIAGRAM_ELEMENT__BORDER_COLOR: - return BORDER_COLOR_EDEFAULT == null ? borderColor != null : !BORDER_COLOR_EDEFAULT.equals(borderColor); - case Di2Package.DIAGRAM_ELEMENT__TRANSLUCENT: - return translucent != TRANSLUCENT_EDEFAULT; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_PARENT: - return semanticParent != null; - case Di2Package.DIAGRAM_ELEMENT__SEMANTIC_CHILD: - return semanticChild != null && !semanticChild.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (isVisible: "); - result.append(isVisible); - result.append(", fontFamily: "); - result.append(fontFamily); - result.append(", fontSize: "); - result.append(fontSize); - result.append(", lineStyle: "); - result.append(lineStyle); - result.append(", lineThickness: "); - result.append(lineThickness); - result.append(", fontColor: "); - result.append(fontColor); - result.append(", foregroundColor: "); - result.append(foregroundColor); - result.append(", backgroundColor: "); - result.append(backgroundColor); - result.append(", borderColor: "); - result.append(borderColor); - result.append(", translucent: "); - result.append(translucent); - result.append(')'); - return result.toString(); - } - -} // DiagramElementImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java deleted file mode 100644 index fc01dd11bdd..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramImpl.java +++ /dev/null @@ -1,466 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Diagram; -import org.eclipse.papyrus.conversion.di2.DiagramLink; -import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; - -/** - * An implementation of the model object 'Diagram'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getOwner Owner}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getName Name}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getZoom Zoom}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getViewport Viewport - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getDiagramLink Diagram - * Link}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramImpl#getType Type}
    • - *
    - *

    - * - * @generated - */ -public class DiagramImpl extends GraphNodeImpl implements Diagram { - - /** - * The cached value of the '{@link #getOwner() Owner}' containment reference. - * - * @see #getOwner() - * @generated - * @ordered - */ - protected SemanticModelBridge owner; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getZoom() Zoom}' attribute. - * - * @see #getZoom() - * @generated - * @ordered - */ - protected static final double ZOOM_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getZoom() Zoom}' attribute. - * - * - * @see #getZoom() - * @generated - * @ordered - */ - protected double zoom = ZOOM_EDEFAULT; - - /** - * The default value of the '{@link #getViewport() Viewport}' attribute. - * - * @see #getViewport() - * @generated - * @ordered - */ - protected static final Point VIEWPORT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getViewport() Viewport}' attribute. - * - * @see #getViewport() - * @generated - * @ordered - */ - protected Point viewport = VIEWPORT_EDEFAULT; - - /** - * The cached value of the '{@link #getDiagramLink() Diagram Link}' reference list. - * - * - * @see #getDiagramLink() - * @generated - * @ordered - */ - protected EList diagramLink; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected DiagramImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.DIAGRAM; - } - - /** - * - * - * @generated - */ - public SemanticModelBridge getOwner() { - return owner; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOwner(SemanticModelBridge newOwner, NotificationChain msgs) { - SemanticModelBridge oldOwner = owner; - owner = newOwner; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__OWNER, - oldOwner, newOwner); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setOwner(SemanticModelBridge newOwner) { - if (newOwner != owner) { - NotificationChain msgs = null; - if (owner != null) - msgs = ((InternalEObject) owner).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - - Di2Package.DIAGRAM__OWNER, null, msgs); - if (newOwner != null) - msgs = ((InternalEObject) newOwner).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - - Di2Package.DIAGRAM__OWNER, null, msgs); - msgs = basicSetOwner(newOwner, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__OWNER, newOwner, newOwner)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public double getZoom() { - return zoom; - } - - /** - * - * - * @generated - */ - public void setZoom(double newZoom) { - double oldZoom = zoom; - zoom = newZoom; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__ZOOM, oldZoom, zoom)); - } - - /** - * - * - * @generated - */ - public Point getViewport() { - return viewport; - } - - /** - * - * - * @generated - */ - public void setViewport(Point newViewport) { - Point oldViewport = viewport; - viewport = newViewport; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__VIEWPORT, oldViewport, viewport)); - } - - /** - * - * - * @generated - */ - public EList getDiagramLink() { - if (diagramLink == null) { - diagramLink = new EObjectResolvingEList(DiagramLink.class, this, - Di2Package.DIAGRAM__DIAGRAM_LINK); - } - return diagramLink; - } - - /** - * - * - * @NOT generated - */ - public String getType() { - if (this.type == null || this.type.equals("")) { - return "ClassDiagram"; - } - return this.type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.DIAGRAM__OWNER: - return basicSetOwner(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.DIAGRAM__OWNER: - return getOwner(); - case Di2Package.DIAGRAM__NAME: - return getName(); - case Di2Package.DIAGRAM__ZOOM: - return new Double(getZoom()); - case Di2Package.DIAGRAM__VIEWPORT: - return getViewport(); - case Di2Package.DIAGRAM__DIAGRAM_LINK: - return getDiagramLink(); - case Di2Package.DIAGRAM__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.DIAGRAM__OWNER: - setOwner((SemanticModelBridge) newValue); - return; - case Di2Package.DIAGRAM__NAME: - setName((String) newValue); - return; - case Di2Package.DIAGRAM__ZOOM: - setZoom(((Double) newValue).doubleValue()); - return; - case Di2Package.DIAGRAM__VIEWPORT: - setViewport((Point) newValue); - return; - case Di2Package.DIAGRAM__DIAGRAM_LINK: - getDiagramLink().clear(); - getDiagramLink().addAll((Collection) newValue); - return; - case Di2Package.DIAGRAM__TYPE: - setType((String) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM__OWNER: - setOwner((SemanticModelBridge) null); - return; - case Di2Package.DIAGRAM__NAME: - setName(NAME_EDEFAULT); - return; - case Di2Package.DIAGRAM__ZOOM: - setZoom(ZOOM_EDEFAULT); - return; - case Di2Package.DIAGRAM__VIEWPORT: - setViewport(VIEWPORT_EDEFAULT); - return; - case Di2Package.DIAGRAM__DIAGRAM_LINK: - getDiagramLink().clear(); - return; - case Di2Package.DIAGRAM__TYPE: - setType(TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM__OWNER: - return owner != null; - case Di2Package.DIAGRAM__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case Di2Package.DIAGRAM__ZOOM: - return zoom != ZOOM_EDEFAULT; - case Di2Package.DIAGRAM__VIEWPORT: - return VIEWPORT_EDEFAULT == null ? viewport != null : !VIEWPORT_EDEFAULT.equals(viewport); - case Di2Package.DIAGRAM__DIAGRAM_LINK: - return diagramLink != null && !diagramLink.isEmpty(); - case Di2Package.DIAGRAM__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", zoom: "); - result.append(zoom); - result.append(", viewport: "); - result.append(viewport); - result.append(", type: "); - result.append(type); - result.append(')'); - return result.toString(); - } - -} // DiagramImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java deleted file mode 100644 index c49e62d7627..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/DiagramLinkImpl.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Diagram; -import org.eclipse.papyrus.conversion.di2.DiagramLink; -import org.eclipse.papyrus.conversion.di2.GraphElement; - -/** - * An implementation of the model object 'Diagram Link'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getDiagram Diagram - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getZoom Zoom}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getViewport Viewport - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.DiagramLinkImpl#getGraphElement Graph - * Element}
    • - *
    - *

    - * - * @generated - */ -public class DiagramLinkImpl extends EObjectImpl implements DiagramLink { - - /** - * The cached value of the '{@link #getDiagram() Diagram}' reference. - * - * @see #getDiagram() - * @generated - * @ordered - */ - protected Diagram diagram; - - /** - * The default value of the '{@link #getZoom() Zoom}' attribute. - * - * @see #getZoom() - * @generated - * @ordered - */ - protected static final double ZOOM_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getZoom() Zoom}' attribute. - * - * - * @see #getZoom() - * @generated - * @ordered - */ - protected double zoom = ZOOM_EDEFAULT; - - /** - * The default value of the '{@link #getViewport() Viewport}' attribute. - * - * @see #getViewport() - * @generated - * @ordered - */ - protected static final Point VIEWPORT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getViewport() Viewport}' attribute. - * - * @see #getViewport() - * @generated - * @ordered - */ - protected Point viewport = VIEWPORT_EDEFAULT; - - /** - * The cached value of the '{@link #getGraphElement() Graph Element}' reference. - * - * @see #getGraphElement() - * @generated - * @ordered - */ - protected GraphElement graphElement; - - /** - * - * - * @generated - */ - protected DiagramLinkImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.DIAGRAM_LINK; - } - - /** - * - * - * @generated - */ - public Diagram getDiagram() { - if (diagram != null && diagram.eIsProxy()) { - InternalEObject oldDiagram = (InternalEObject) diagram; - diagram = (Diagram) eResolveProxy(oldDiagram); - if (diagram != oldDiagram) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.DIAGRAM_LINK__DIAGRAM, - oldDiagram, diagram)); - } - } - return diagram; - } - - /** - * - * - * @generated - */ - public Diagram basicGetDiagram() { - return diagram; - } - - /** - * - * - * @generated - */ - public void setDiagram(Diagram newDiagram) { - Diagram oldDiagram = diagram; - diagram = newDiagram; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__DIAGRAM, oldDiagram, diagram)); - } - - /** - * - * - * @generated - */ - public double getZoom() { - return zoom; - } - - /** - * - * - * @generated - */ - public void setZoom(double newZoom) { - double oldZoom = zoom; - zoom = newZoom; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__ZOOM, oldZoom, zoom)); - } - - /** - * - * - * @generated - */ - public Point getViewport() { - return viewport; - } - - /** - * - * - * @generated - */ - public void setViewport(Point newViewport) { - Point oldViewport = viewport; - viewport = newViewport; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__VIEWPORT, oldViewport, - viewport)); - } - - /** - * - * - * @generated - */ - public GraphElement getGraphElement() { - if (graphElement != null && graphElement.eIsProxy()) { - InternalEObject oldGraphElement = (InternalEObject) graphElement; - graphElement = (GraphElement) eResolveProxy(oldGraphElement); - if (graphElement != oldGraphElement) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT, - oldGraphElement, graphElement)); - } - } - return graphElement; - } - - /** - * - * - * @generated - */ - public GraphElement basicGetGraphElement() { - return graphElement; - } - - /** - * - * - * @generated - */ - public void setGraphElement(GraphElement newGraphElement) { - GraphElement oldGraphElement = graphElement; - graphElement = newGraphElement; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT, - oldGraphElement, graphElement)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.DIAGRAM_LINK__DIAGRAM: - if (resolve) - return getDiagram(); - return basicGetDiagram(); - case Di2Package.DIAGRAM_LINK__ZOOM: - return new Double(getZoom()); - case Di2Package.DIAGRAM_LINK__VIEWPORT: - return getViewport(); - case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: - if (resolve) - return getGraphElement(); - return basicGetGraphElement(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.DIAGRAM_LINK__DIAGRAM: - setDiagram((Diagram) newValue); - return; - case Di2Package.DIAGRAM_LINK__ZOOM: - setZoom(((Double) newValue).doubleValue()); - return; - case Di2Package.DIAGRAM_LINK__VIEWPORT: - setViewport((Point) newValue); - return; - case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: - setGraphElement((GraphElement) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM_LINK__DIAGRAM: - setDiagram((Diagram) null); - return; - case Di2Package.DIAGRAM_LINK__ZOOM: - setZoom(ZOOM_EDEFAULT); - return; - case Di2Package.DIAGRAM_LINK__VIEWPORT: - setViewport(VIEWPORT_EDEFAULT); - return; - case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: - setGraphElement((GraphElement) null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.DIAGRAM_LINK__DIAGRAM: - return diagram != null; - case Di2Package.DIAGRAM_LINK__ZOOM: - return zoom != ZOOM_EDEFAULT; - case Di2Package.DIAGRAM_LINK__VIEWPORT: - return VIEWPORT_EDEFAULT == null ? viewport != null : !VIEWPORT_EDEFAULT.equals(viewport); - case Di2Package.DIAGRAM_LINK__GRAPH_ELEMENT: - return graphElement != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (zoom: "); - result.append(zoom); - result.append(", viewport: "); - result.append(viewport); - result.append(')'); - return result.toString(); - } - -} // DiagramLinkImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java deleted file mode 100644 index f7bc0a3b71c..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/EllipseImpl.java +++ /dev/null @@ -1,445 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Ellipse; - -/** - * An implementation of the model object 'Ellipse'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getCenter Center}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRadiusX Radius X} - *
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRadiusY Radius Y} - *
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getRotation Rotation - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getStartAngle Start Angle - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.EllipseImpl#getEndAngle End Angle - * }
    • - *
    - *

    - * - * @generated - */ -public class EllipseImpl extends GraphicPrimitiveImpl implements Ellipse { - - /** - * The default value of the '{@link #getCenter() Center}' attribute. - * - * @see #getCenter() - * @generated - * @ordered - */ - protected static final Point CENTER_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCenter() Center}' attribute. - * - * @see #getCenter() - * @generated - * @ordered - */ - protected Point center = CENTER_EDEFAULT; - - /** - * The default value of the '{@link #getRadiusX() Radius X}' attribute. - * - * @see #getRadiusX() - * @generated - * @ordered - */ - protected static final double RADIUS_X_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getRadiusX() Radius X}' attribute. - * - * @see #getRadiusX() - * @generated - * @ordered - */ - protected double radiusX = RADIUS_X_EDEFAULT; - - /** - * The default value of the '{@link #getRadiusY() Radius Y}' attribute. - * - * @see #getRadiusY() - * @generated - * @ordered - */ - protected static final double RADIUS_Y_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getRadiusY() Radius Y}' attribute. - * - * @see #getRadiusY() - * @generated - * @ordered - */ - protected double radiusY = RADIUS_Y_EDEFAULT; - - /** - * The default value of the '{@link #getRotation() Rotation}' attribute. - * - * @see #getRotation() - * @generated - * @ordered - */ - protected static final double ROTATION_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getRotation() Rotation}' attribute. - * - * @see #getRotation() - * @generated - * @ordered - */ - protected double rotation = ROTATION_EDEFAULT; - - /** - * The default value of the '{@link #getStartAngle() Start Angle}' attribute. - * - * @see #getStartAngle() - * @generated - * @ordered - */ - protected static final double START_ANGLE_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getStartAngle() Start Angle}' attribute. - * - * @see #getStartAngle() - * @generated - * @ordered - */ - protected double startAngle = START_ANGLE_EDEFAULT; - - /** - * The default value of the '{@link #getEndAngle() End Angle}' attribute. - * - * @see #getEndAngle() - * @generated - * @ordered - */ - protected static final double END_ANGLE_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getEndAngle() End Angle}' attribute. - * - * @see #getEndAngle() - * @generated - * @ordered - */ - protected double endAngle = END_ANGLE_EDEFAULT; - - /** - * - * - * @generated - */ - protected EllipseImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.ELLIPSE; - } - - /** - * - * - * @generated - */ - public Point getCenter() { - return center; - } - - /** - * - * - * @generated - */ - public void setCenter(Point newCenter) { - Point oldCenter = center; - center = newCenter; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__CENTER, oldCenter, center)); - } - - /** - * - * - * @generated - */ - public double getRadiusX() { - return radiusX; - } - - /** - * - * - * @generated - */ - public void setRadiusX(double newRadiusX) { - double oldRadiusX = radiusX; - radiusX = newRadiusX; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__RADIUS_X, oldRadiusX, radiusX)); - } - - /** - * - * - * @generated - */ - public double getRadiusY() { - return radiusY; - } - - /** - * - * - * @generated - */ - public void setRadiusY(double newRadiusY) { - double oldRadiusY = radiusY; - radiusY = newRadiusY; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__RADIUS_Y, oldRadiusY, radiusY)); - } - - /** - * - * - * @generated - */ - public double getRotation() { - return rotation; - } - - /** - * - * - * @generated - */ - public void setRotation(double newRotation) { - double oldRotation = rotation; - rotation = newRotation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__ROTATION, oldRotation, rotation)); - } - - /** - * - * - * @generated - */ - public double getStartAngle() { - return startAngle; - } - - /** - * - * - * @generated - */ - public void setStartAngle(double newStartAngle) { - double oldStartAngle = startAngle; - startAngle = newStartAngle; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__START_ANGLE, oldStartAngle, - startAngle)); - } - - /** - * - * - * @generated - */ - public double getEndAngle() { - return endAngle; - } - - /** - * - * - * @generated - */ - public void setEndAngle(double newEndAngle) { - double oldEndAngle = endAngle; - endAngle = newEndAngle; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.ELLIPSE__END_ANGLE, oldEndAngle, endAngle)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.ELLIPSE__CENTER: - return getCenter(); - case Di2Package.ELLIPSE__RADIUS_X: - return new Double(getRadiusX()); - case Di2Package.ELLIPSE__RADIUS_Y: - return new Double(getRadiusY()); - case Di2Package.ELLIPSE__ROTATION: - return new Double(getRotation()); - case Di2Package.ELLIPSE__START_ANGLE: - return new Double(getStartAngle()); - case Di2Package.ELLIPSE__END_ANGLE: - return new Double(getEndAngle()); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.ELLIPSE__CENTER: - setCenter((Point) newValue); - return; - case Di2Package.ELLIPSE__RADIUS_X: - setRadiusX(((Double) newValue).doubleValue()); - return; - case Di2Package.ELLIPSE__RADIUS_Y: - setRadiusY(((Double) newValue).doubleValue()); - return; - case Di2Package.ELLIPSE__ROTATION: - setRotation(((Double) newValue).doubleValue()); - return; - case Di2Package.ELLIPSE__START_ANGLE: - setStartAngle(((Double) newValue).doubleValue()); - return; - case Di2Package.ELLIPSE__END_ANGLE: - setEndAngle(((Double) newValue).doubleValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.ELLIPSE__CENTER: - setCenter(CENTER_EDEFAULT); - return; - case Di2Package.ELLIPSE__RADIUS_X: - setRadiusX(RADIUS_X_EDEFAULT); - return; - case Di2Package.ELLIPSE__RADIUS_Y: - setRadiusY(RADIUS_Y_EDEFAULT); - return; - case Di2Package.ELLIPSE__ROTATION: - setRotation(ROTATION_EDEFAULT); - return; - case Di2Package.ELLIPSE__START_ANGLE: - setStartAngle(START_ANGLE_EDEFAULT); - return; - case Di2Package.ELLIPSE__END_ANGLE: - setEndAngle(END_ANGLE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.ELLIPSE__CENTER: - return CENTER_EDEFAULT == null ? center != null : !CENTER_EDEFAULT.equals(center); - case Di2Package.ELLIPSE__RADIUS_X: - return radiusX != RADIUS_X_EDEFAULT; - case Di2Package.ELLIPSE__RADIUS_Y: - return radiusY != RADIUS_Y_EDEFAULT; - case Di2Package.ELLIPSE__ROTATION: - return rotation != ROTATION_EDEFAULT; - case Di2Package.ELLIPSE__START_ANGLE: - return startAngle != START_ANGLE_EDEFAULT; - case Di2Package.ELLIPSE__END_ANGLE: - return endAngle != END_ANGLE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (center: "); - result.append(center); - result.append(", radiusX: "); - result.append(radiusX); - result.append(", radiusY: "); - result.append(radiusY); - result.append(", rotation: "); - result.append(rotation); - result.append(", startAngle: "); - result.append(startAngle); - result.append(", endAngle: "); - result.append(endAngle); - result.append(')'); - return result.toString(); - } - -} // EllipseImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java deleted file mode 100644 index 5974aca3472..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphConnectorImpl.java +++ /dev/null @@ -1,328 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.GraphConnector; -import org.eclipse.papyrus.conversion.di2.GraphEdge; -import org.eclipse.papyrus.conversion.di2.GraphElement; - -/** - * An implementation of the model object 'Graph Connector'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getPosition - * Position}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getGraphEdge Graph - * Edge}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphConnectorImpl#getGraphElement - * Graph Element}
    • - *
    - *

    - * - * @generated - */ -public class GraphConnectorImpl extends EObjectImpl implements GraphConnector { - - /** - * The default value of the '{@link #getPosition() Position}' attribute. - * - * @see #getPosition() - * @generated - * @ordered - */ - protected static final Point POSITION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPosition() Position}' attribute. - * - * @see #getPosition() - * @generated - * @ordered - */ - protected Point position = POSITION_EDEFAULT; - - /** - * The cached value of the '{@link #getGraphEdge() Graph Edge}' reference list. - * - * @see #getGraphEdge() - * @generated - * @ordered - */ - protected EList graphEdge; - - /** - * - * - * @generated - */ - protected GraphConnectorImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.GRAPH_CONNECTOR; - } - - /** - * - * - * @generated - */ - public Point getPosition() { - return position; - } - - /** - * - * - * @generated - */ - public void setPosition(Point newPosition) { - Point oldPosition = position; - position = newPosition; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_CONNECTOR__POSITION, oldPosition, - position)); - } - - /** - * - * - * @generated - */ - public EList getGraphEdge() { - if (graphEdge == null) { - graphEdge = new EObjectWithInverseResolvingEList.ManyInverse(GraphEdge.class, this, - Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE, Di2Package.GRAPH_EDGE__ANCHOR); - } - return graphEdge; - } - - /** - * - * - * @generated - */ - public GraphElement getGraphElement() { - if (eContainerFeatureID != Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT) - return null; - return (GraphElement) eContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetGraphElement(GraphElement newGraphElement, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject) newGraphElement, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setGraphElement(GraphElement newGraphElement) { - if (newGraphElement != eInternalContainer() - || (eContainerFeatureID != Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT && newGraphElement != null)) { - if (EcoreUtil.isAncestor(this, newGraphElement)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newGraphElement != null) - msgs = ((InternalEObject) newGraphElement).eInverseAdd(this, Di2Package.GRAPH_ELEMENT__ANCHORAGE, - GraphElement.class, msgs); - msgs = basicSetGraphElement(newGraphElement, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT, - newGraphElement, newGraphElement)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - return ((InternalEList) (InternalEList) getGraphEdge()).basicAdd(otherEnd, msgs); - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetGraphElement((GraphElement) otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - return ((InternalEList) getGraphEdge()).basicRemove(otherEnd, msgs); - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - return basicSetGraphElement(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID) { - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - return eInternalContainer().eInverseRemove(this, Di2Package.GRAPH_ELEMENT__ANCHORAGE, GraphElement.class, - msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__POSITION: - return getPosition(); - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - return getGraphEdge(); - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - return getGraphElement(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__POSITION: - setPosition((Point) newValue); - return; - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - getGraphEdge().clear(); - getGraphEdge().addAll((Collection) newValue); - return; - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - setGraphElement((GraphElement) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__POSITION: - setPosition(POSITION_EDEFAULT); - return; - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - getGraphEdge().clear(); - return; - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - setGraphElement((GraphElement) null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_CONNECTOR__POSITION: - return POSITION_EDEFAULT == null ? position != null : !POSITION_EDEFAULT.equals(position); - case Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE: - return graphEdge != null && !graphEdge.isEmpty(); - case Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT: - return getGraphElement() != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (position: "); - result.append(position); - result.append(')'); - return result.toString(); - } - -} // GraphConnectorImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java deleted file mode 100644 index 94ab66b63da..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphEdgeImpl.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.GraphConnector; -import org.eclipse.papyrus.conversion.di2.GraphEdge; -import org.eclipse.papyrus.conversion.di2.GraphElement; - -/** - * An implementation of the model object 'Graph Edge'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl#getAnchor Anchor}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphEdgeImpl#getWaypoints Waypoints - * }
    • - *
    - *

    - * - * @generated - */ -public class GraphEdgeImpl extends GraphElementImpl implements GraphEdge { - - /** - * The cached value of the '{@link #getAnchor() Anchor}' reference list. - * - * @see #getAnchor() - * @generated - * @ordered - */ - protected EList anchor; - - /** - * The cached value of the '{@link #getWaypoints() Waypoints}' attribute list. - * - * @see #getWaypoints() - * @generated - * @ordered - */ - protected EList waypoints; - - /** - * - * - * @generated - */ - protected GraphEdgeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.GRAPH_EDGE; - } - - /** - * - * - * @generated - */ - public EList getAnchor() { - if (anchor == null) { - anchor = new EObjectWithInverseResolvingEList.ManyInverse(GraphConnector.class, this, - Di2Package.GRAPH_EDGE__ANCHOR, Di2Package.GRAPH_CONNECTOR__GRAPH_EDGE); - } - return anchor; - } - - /** - * - * - * @generated - */ - public EList getWaypoints() { - if (waypoints == null) { - waypoints = new EDataTypeUniqueEList(Point.class, this, Di2Package.GRAPH_EDGE__WAYPOINTS); - } - return waypoints; - } - - /** - * - * - * @generated - */ - public GraphElement getAnchorSource() { - return ((GraphConnector) getAnchor().get(0)).getGraphElement(); - } - - /** - * - * - * @generated - */ - public GraphElement getAnchorTarget() { - return ((GraphConnector) getAnchor().get(1)).getGraphElement(); - } - - /** - * - * - * @generated - */ - public void setAnchorSource(GraphElement value) { - initConnectors(); - ((GraphConnector) getAnchor().get(0)).setGraphElement(value); - } - - /** - * - * - * @generated - */ - public void setAnchorTarget(GraphElement value) { - initConnectors(); - ((GraphConnector) getAnchor().get(1)).setGraphElement(value); - } - - /** - * - * - * @generated - */ - public void initConnectors() { - if (!getAnchor().isEmpty()) - return; - - getAnchor().add(Di2Package.eINSTANCE.getDi2Factory().createGraphConnector()); - getAnchor().add(Di2Package.eINSTANCE.getDi2Factory().createGraphConnector()); - - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - return ((InternalEList) (InternalEList) getAnchor()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - return ((InternalEList) getAnchor()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - return getAnchor(); - case Di2Package.GRAPH_EDGE__WAYPOINTS: - return getWaypoints(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - getAnchor().clear(); - getAnchor().addAll((Collection) newValue); - return; - case Di2Package.GRAPH_EDGE__WAYPOINTS: - getWaypoints().clear(); - getWaypoints().addAll((Collection) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - getAnchor().clear(); - return; - case Di2Package.GRAPH_EDGE__WAYPOINTS: - getWaypoints().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_EDGE__ANCHOR: - return anchor != null && !anchor.isEmpty(); - case Di2Package.GRAPH_EDGE__WAYPOINTS: - return waypoints != null && !waypoints.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (waypoints: "); - result.append(waypoints); - result.append(')'); - return result.toString(); - } - -} // GraphEdgeImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java deleted file mode 100644 index 3cbe314b11f..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphElementImpl.java +++ /dev/null @@ -1,401 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.DiagramElement; -import org.eclipse.papyrus.conversion.di2.DiagramLink; -import org.eclipse.papyrus.conversion.di2.GraphConnector; -import org.eclipse.papyrus.conversion.di2.GraphElement; -import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; - -/** - * An implementation of the model object 'Graph Element'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getContained - * Contained}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getLink Link}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getSemanticModel - * Semantic Model}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getPosition Position - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphElementImpl#getAnchorage - * Anchorage}
    • - *
    - *

    - * - * @generated - */ -public class GraphElementImpl extends DiagramElementImpl implements GraphElement { - - /** - * The cached value of the '{@link #getContained() Contained}' containment reference - * list. - * - * @see #getContained() - * @generated - * @ordered - */ - protected EList contained; - - /** - * The cached value of the '{@link #getLink() Link}' containment reference list. - * - * @see #getLink() - * @generated - * @ordered - */ - protected EList link; - - /** - * The cached value of the '{@link #getSemanticModel() Semantic Model}' containment - * reference. - * - * @see #getSemanticModel() - * @generated - * @ordered - */ - protected SemanticModelBridge semanticModel; - - /** - * The default value of the '{@link #getPosition() Position}' attribute. - * - * @see #getPosition() - * @generated - * @ordered - */ - protected static final Point POSITION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPosition() Position}' attribute. - * - * @see #getPosition() - * @generated - * @ordered - */ - protected Point position = POSITION_EDEFAULT; - - /** - * The cached value of the '{@link #getAnchorage() Anchorage}' containment reference - * list. - * - * @see #getAnchorage() - * @generated - * @ordered - */ - protected EList anchorage; - - /** - * - * - * @generated - */ - protected GraphElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.GRAPH_ELEMENT; - } - - /** - * - * - * @generated - */ - public EList getContained() { - if (contained == null) { - contained = new EObjectContainmentWithInverseEList(DiagramElement.class, this, - Di2Package.GRAPH_ELEMENT__CONTAINED, Di2Package.DIAGRAM_ELEMENT__CONTAINER); - } - return contained; - } - - /** - * - * - * @generated - */ - public EList getLink() { - if (link == null) { - link = new EObjectContainmentEList(DiagramLink.class, this, Di2Package.GRAPH_ELEMENT__LINK); - } - return link; - } - - /** - * - * - * @generated - */ - public SemanticModelBridge getSemanticModel() { - return semanticModel; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSemanticModel(SemanticModelBridge newSemanticModel, NotificationChain msgs) { - SemanticModelBridge oldSemanticModel = semanticModel; - semanticModel = newSemanticModel; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, oldSemanticModel, newSemanticModel); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSemanticModel(SemanticModelBridge newSemanticModel) { - if (newSemanticModel != semanticModel) { - NotificationChain msgs = null; - if (semanticModel != null) - msgs = ((InternalEObject) semanticModel).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - - Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, null, msgs); - if (newSemanticModel != null) - msgs = ((InternalEObject) newSemanticModel).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - - Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, null, msgs); - msgs = basicSetSemanticModel(newSemanticModel, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL, - newSemanticModel, newSemanticModel)); - } - - /** - * - * - * @generated - */ - public Point getPosition() { - return position; - } - - /** - * - * - * @generated - */ - public void setPosition(Point newPosition) { - Point oldPosition = position; - position = newPosition; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_ELEMENT__POSITION, oldPosition, - position)); - } - - /** - * - * - * @generated - */ - public EList getAnchorage() { - if (anchorage == null) { - anchorage = new EObjectContainmentWithInverseEList(GraphConnector.class, this, - Di2Package.GRAPH_ELEMENT__ANCHORAGE, Di2Package.GRAPH_CONNECTOR__GRAPH_ELEMENT); - } - return anchorage; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - return ((InternalEList) (InternalEList) getContained()).basicAdd(otherEnd, msgs); - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - return ((InternalEList) (InternalEList) getAnchorage()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - return ((InternalEList) getContained()).basicRemove(otherEnd, msgs); - case Di2Package.GRAPH_ELEMENT__LINK: - return ((InternalEList) getLink()).basicRemove(otherEnd, msgs); - case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: - return basicSetSemanticModel(null, msgs); - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - return ((InternalEList) getAnchorage()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - return getContained(); - case Di2Package.GRAPH_ELEMENT__LINK: - return getLink(); - case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: - return getSemanticModel(); - case Di2Package.GRAPH_ELEMENT__POSITION: - return getPosition(); - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - return getAnchorage(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - getContained().clear(); - getContained().addAll((Collection) newValue); - return; - case Di2Package.GRAPH_ELEMENT__LINK: - getLink().clear(); - getLink().addAll((Collection) newValue); - return; - case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: - setSemanticModel((SemanticModelBridge) newValue); - return; - case Di2Package.GRAPH_ELEMENT__POSITION: - setPosition((Point) newValue); - return; - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - getAnchorage().clear(); - getAnchorage().addAll((Collection) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - getContained().clear(); - return; - case Di2Package.GRAPH_ELEMENT__LINK: - getLink().clear(); - return; - case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: - setSemanticModel((SemanticModelBridge) null); - return; - case Di2Package.GRAPH_ELEMENT__POSITION: - setPosition(POSITION_EDEFAULT); - return; - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - getAnchorage().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_ELEMENT__CONTAINED: - return contained != null && !contained.isEmpty(); - case Di2Package.GRAPH_ELEMENT__LINK: - return link != null && !link.isEmpty(); - case Di2Package.GRAPH_ELEMENT__SEMANTIC_MODEL: - return semanticModel != null; - case Di2Package.GRAPH_ELEMENT__POSITION: - return POSITION_EDEFAULT == null ? position != null : !POSITION_EDEFAULT.equals(position); - case Di2Package.GRAPH_ELEMENT__ANCHORAGE: - return anchorage != null && !anchorage.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (position: "); - result.append(position); - result.append(')'); - return result.toString(); - } - -} // GraphElementImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java deleted file mode 100644 index 93d11a18ecf..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphNodeImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.draw2d.geometry.Dimension; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.GraphNode; - -/** - * An implementation of the model object 'Graph Node'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.GraphNodeImpl#getSize Size}
    • - *
    - *

    - * - * @generated - */ -public class GraphNodeImpl extends GraphElementImpl implements GraphNode { - - /** - * The default value of the '{@link #getSize() Size}' attribute. - * - * @see #getSize() - * @generated - * @ordered - */ - protected static final Dimension SIZE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSize() Size}' attribute. - * - * - * @see #getSize() - * @generated - * @ordered - */ - protected Dimension size = SIZE_EDEFAULT; - - /** - * - * - * @generated - */ - protected GraphNodeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.GRAPH_NODE; - } - - /** - * - * - * @generated - */ - public Dimension getSize() { - return size; - } - - /** - * - * - * @generated - */ - public void setSize(Dimension newSize) { - Dimension oldSize = size; - size = newSize; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.GRAPH_NODE__SIZE, oldSize, size)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.GRAPH_NODE__SIZE: - return getSize(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.GRAPH_NODE__SIZE: - setSize((Dimension) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_NODE__SIZE: - setSize(SIZE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.GRAPH_NODE__SIZE: - return SIZE_EDEFAULT == null ? size != null : !SIZE_EDEFAULT.equals(size); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (size: "); - result.append(size); - result.append(')'); - return result.toString(); - } - -} // GraphNodeImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java deleted file mode 100644 index 3f6c49353ab..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/GraphicPrimitiveImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.GraphicPrimitive; - -/** - * An implementation of the model object 'Graphic Primitive - * '. - *

    - *

    - * - * @generated - */ -public class GraphicPrimitiveImpl extends LeafElementImpl implements GraphicPrimitive { - - /** - * - * - * @generated - */ - protected GraphicPrimitiveImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.GRAPHIC_PRIMITIVE; - } - -} // GraphicPrimitiveImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java deleted file mode 100644 index 7b2af5b32ae..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ImageImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Image; - -/** - * An implementation of the model object 'Image'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl#getUri Uri}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ImageImpl#getMimeType Mime Type} - *
    • - *
    - *

    - * - * @generated - */ -public class ImageImpl extends LeafElementImpl implements Image { - - /** - * The default value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected static final String URI_EDEFAULT = null; - - /** - * The cached value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected String uri = URI_EDEFAULT; - - /** - * The default value of the '{@link #getMimeType() Mime Type}' attribute. - * - * @see #getMimeType() - * @generated - * @ordered - */ - protected static final String MIME_TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getMimeType() Mime Type}' attribute. - * - * @see #getMimeType() - * @generated - * @ordered - */ - protected String mimeType = MIME_TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected ImageImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.IMAGE; - } - - /** - * - * - * @generated - */ - public String getUri() { - return uri; - } - - /** - * - * - * @generated - */ - public void setUri(String newUri) { - String oldUri = uri; - uri = newUri; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.IMAGE__URI, oldUri, uri)); - } - - /** - * - * - * @generated - */ - public String getMimeType() { - return mimeType; - } - - /** - * - * - * @generated - */ - public void setMimeType(String newMimeType) { - String oldMimeType = mimeType; - mimeType = newMimeType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.IMAGE__MIME_TYPE, oldMimeType, mimeType)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.IMAGE__URI: - return getUri(); - case Di2Package.IMAGE__MIME_TYPE: - return getMimeType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.IMAGE__URI: - setUri((String) newValue); - return; - case Di2Package.IMAGE__MIME_TYPE: - setMimeType((String) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.IMAGE__URI: - setUri(URI_EDEFAULT); - return; - case Di2Package.IMAGE__MIME_TYPE: - setMimeType(MIME_TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.IMAGE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case Di2Package.IMAGE__MIME_TYPE: - return MIME_TYPE_EDEFAULT == null ? mimeType != null : !MIME_TYPE_EDEFAULT.equals(mimeType); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (uri: "); - result.append(uri); - result.append(", mimeType: "); - result.append(mimeType); - result.append(')'); - return result.toString(); - } - -} // ImageImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java deleted file mode 100644 index be2328258cc..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/LeafElementImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.LeafElement; - -/** - * An implementation of the model object 'Leaf Element'. - * - *

    - *

    - * - * @generated - */ -public class LeafElementImpl extends DiagramElementImpl implements LeafElement { - - /** - * - * - * @generated - */ - protected LeafElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.LEAF_ELEMENT; - } - -} // LeafElementImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java deleted file mode 100644 index dc6b3e64f2a..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PolilyneImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import java.util.Collection; - -import org.eclipse.draw2d.geometry.Point; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Polilyne; - -/** - * An implementation of the model object 'Polilyne'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl#getWaypoints Waypoints - * }
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PolilyneImpl#getClosed Closed}
    • - *
    - *

    - * - * @generated - */ -public class PolilyneImpl extends GraphicPrimitiveImpl implements Polilyne { - - /** - * The cached value of the '{@link #getWaypoints() Waypoints}' attribute list. - * - * @see #getWaypoints() - * @generated - * @ordered - */ - protected EList waypoints; - - /** - * The cached value of the '{@link #getClosed() Closed}' attribute list. - * - * @see #getClosed() - * @generated - * @ordered - */ - protected EList closed; - - /** - * - * - * @generated - */ - protected PolilyneImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.POLILYNE; - } - - /** - * - * - * @generated - */ - public EList getWaypoints() { - if (waypoints == null) { - waypoints = new EDataTypeUniqueEList(Point.class, this, Di2Package.POLILYNE__WAYPOINTS); - } - return waypoints; - } - - /** - * - * - * @generated - */ - public EList getClosed() { - if (closed == null) { - closed = new EDataTypeUniqueEList(Boolean.class, this, Di2Package.POLILYNE__CLOSED); - } - return closed; - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.POLILYNE__WAYPOINTS: - return getWaypoints(); - case Di2Package.POLILYNE__CLOSED: - return getClosed(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.POLILYNE__WAYPOINTS: - getWaypoints().clear(); - getWaypoints().addAll((Collection) newValue); - return; - case Di2Package.POLILYNE__CLOSED: - getClosed().clear(); - getClosed().addAll((Collection) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.POLILYNE__WAYPOINTS: - getWaypoints().clear(); - return; - case Di2Package.POLILYNE__CLOSED: - getClosed().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.POLILYNE__WAYPOINTS: - return waypoints != null && !waypoints.isEmpty(); - case Di2Package.POLILYNE__CLOSED: - return closed != null && !closed.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (waypoints: "); - result.append(waypoints); - result.append(", closed: "); - result.append(closed); - result.append(')'); - return result.toString(); - } - -} // PolilyneImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java deleted file mode 100644 index 67a576ad15c..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/PropertyImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Property; - -/** - * An implementation of the model object 'Property'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl#getKey Key}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.PropertyImpl#getValue Value}
    • - *
    - *

    - * - * @generated - */ -public class PropertyImpl extends EObjectImpl implements Property { - - /** - * The default value of the '{@link #getKey() Key}' attribute. - * - * - * @see #getKey() - * @generated - * @ordered - */ - protected static final String KEY_EDEFAULT = null; - - /** - * The cached value of the '{@link #getKey() Key}' attribute. - * - * - * @see #getKey() - * @generated - * @ordered - */ - protected String key = KEY_EDEFAULT; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * - * - * @generated - */ - protected PropertyImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.PROPERTY; - } - - /** - * - * - * @generated - */ - public String getKey() { - return key; - } - - /** - * - * - * @generated - */ - public void setKey(String newKey) { - String oldKey = key; - key = newKey; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.PROPERTY__KEY, oldKey, key)); - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.PROPERTY__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.PROPERTY__KEY: - return getKey(); - case Di2Package.PROPERTY__VALUE: - return getValue(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.PROPERTY__KEY: - setKey((String) newValue); - return; - case Di2Package.PROPERTY__VALUE: - setValue((String) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.PROPERTY__KEY: - setKey(KEY_EDEFAULT); - return; - case Di2Package.PROPERTY__VALUE: - setValue(VALUE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.PROPERTY__KEY: - return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key); - case Di2Package.PROPERTY__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (key: "); - result.append(key); - result.append(", value: "); - result.append(value); - result.append(')'); - return result.toString(); - } - -} // PropertyImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java deleted file mode 100644 index 226ceecd230..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/ReferenceImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.DiagramElement; -import org.eclipse.papyrus.conversion.di2.Reference; - -/** - * An implementation of the model object 'Reference'. - *

    - * The following features are implemented: - *

      - *
    • - * {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl#isIsIndividualRepresentation - * Is Individual Representation}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.ReferenceImpl#getReferenced - * Referenced}
    • - *
    - *

    - * - * @generated - */ -public class ReferenceImpl extends DiagramElementImpl implements Reference { - - /** - * The default value of the '{@link #isIsIndividualRepresentation() - * Is Individual Representation}' attribute. - * - * @see #isIsIndividualRepresentation() - * @generated - * @ordered - */ - protected static final boolean IS_INDIVIDUAL_REPRESENTATION_EDEFAULT = false; - - /** - * The cached value of the '{@link #isIsIndividualRepresentation() - * Is Individual Representation}' attribute. - * - * @see #isIsIndividualRepresentation() - * @generated - * @ordered - */ - protected boolean isIndividualRepresentation = IS_INDIVIDUAL_REPRESENTATION_EDEFAULT; - - /** - * The cached value of the '{@link #getReferenced() Referenced}' reference. - * - * @see #getReferenced() - * @generated - * @ordered - */ - protected DiagramElement referenced; - - /** - * - * - * @generated - */ - protected ReferenceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.REFERENCE; - } - - /** - * - * - * @generated - */ - public boolean isIsIndividualRepresentation() { - return isIndividualRepresentation; - } - - /** - * - * - * @generated - */ - public void setIsIndividualRepresentation(boolean newIsIndividualRepresentation) { - boolean oldIsIndividualRepresentation = isIndividualRepresentation; - isIndividualRepresentation = newIsIndividualRepresentation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION, - oldIsIndividualRepresentation, isIndividualRepresentation)); - } - - /** - * - * - * @generated - */ - public DiagramElement getReferenced() { - if (referenced != null && referenced.eIsProxy()) { - InternalEObject oldReferenced = (InternalEObject) referenced; - referenced = (DiagramElement) eResolveProxy(oldReferenced); - if (referenced != oldReferenced) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Di2Package.REFERENCE__REFERENCED, - oldReferenced, referenced)); - } - } - return referenced; - } - - /** - * - * - * @generated - */ - public DiagramElement basicGetReferenced() { - return referenced; - } - - /** - * - * - * @generated - */ - public void setReferenced(DiagramElement newReferenced) { - DiagramElement oldReferenced = referenced; - referenced = newReferenced; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.REFERENCE__REFERENCED, oldReferenced, - referenced)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: - return isIsIndividualRepresentation() ? Boolean.TRUE : Boolean.FALSE; - case Di2Package.REFERENCE__REFERENCED: - if (resolve) - return getReferenced(); - return basicGetReferenced(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: - setIsIndividualRepresentation(((Boolean) newValue).booleanValue()); - return; - case Di2Package.REFERENCE__REFERENCED: - setReferenced((DiagramElement) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: - setIsIndividualRepresentation(IS_INDIVIDUAL_REPRESENTATION_EDEFAULT); - return; - case Di2Package.REFERENCE__REFERENCED: - setReferenced((DiagramElement) null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.REFERENCE__IS_INDIVIDUAL_REPRESENTATION: - return isIndividualRepresentation != IS_INDIVIDUAL_REPRESENTATION_EDEFAULT; - case Di2Package.REFERENCE__REFERENCED: - return referenced != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (isIndividualRepresentation: "); - result.append(isIndividualRepresentation); - result.append(')'); - return result.toString(); - } - -} // ReferenceImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java deleted file mode 100644 index ca74d4c0bd7..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SemanticModelBridgeImpl.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.GraphElement; -import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; - -/** - * An implementation of the model object ' - * Semantic Model Bridge'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl#getPresentation - * Presentation}
    • - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.SemanticModelBridgeImpl#getGraphElement - * Graph Element}
    • - *
    - *

    - * - * @generated - */ -public class SemanticModelBridgeImpl extends EObjectImpl implements SemanticModelBridge { - - /** - * The default value of the '{@link #getPresentation() Presentation}' attribute. - * - * @see #getPresentation() - * @generated - * @ordered - */ - protected static final String PRESENTATION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPresentation() Presentation}' attribute. - * - * @see #getPresentation() - * @generated - * @ordered - */ - protected String presentation = PRESENTATION_EDEFAULT; - - /** - * The cached value of the '{@link #getGraphElement() Graph Element}' reference. - * - * @see #getGraphElement() - * @generated - * @ordered - */ - protected GraphElement graphElement; - - /** - * - * - * @generated - */ - protected SemanticModelBridgeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.SEMANTIC_MODEL_BRIDGE; - } - - /** - * - * - * @generated - */ - public String getPresentation() { - return presentation; - } - - /** - * - * - * @generated - */ - public void setPresentation(String newPresentation) { - String oldPresentation = presentation; - presentation = newPresentation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION, - oldPresentation, presentation)); - } - - /** - * - * - * @generated - */ - public GraphElement getGraphElement() { - if (graphElement != null && graphElement.eIsProxy()) { - InternalEObject oldGraphElement = (InternalEObject) graphElement; - graphElement = (GraphElement) eResolveProxy(oldGraphElement); - if (graphElement != oldGraphElement) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, - Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT, oldGraphElement, graphElement)); - } - } - return graphElement; - } - - /** - * - * - * @generated - */ - public GraphElement basicGetGraphElement() { - return graphElement; - } - - /** - * - * - * @generated - */ - public void setGraphElement(GraphElement newGraphElement) { - GraphElement oldGraphElement = graphElement; - graphElement = newGraphElement; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT, - oldGraphElement, graphElement)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: - return getPresentation(); - case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: - if (resolve) - return getGraphElement(); - return basicGetGraphElement(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: - setPresentation((String) newValue); - return; - case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: - setGraphElement((GraphElement) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: - setPresentation(PRESENTATION_EDEFAULT); - return; - case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: - setGraphElement((GraphElement) null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.SEMANTIC_MODEL_BRIDGE__PRESENTATION: - return PRESENTATION_EDEFAULT == null ? presentation != null : !PRESENTATION_EDEFAULT.equals(presentation); - case Di2Package.SEMANTIC_MODEL_BRIDGE__GRAPH_ELEMENT: - return graphElement != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (presentation: "); - result.append(presentation); - result.append(')'); - return result.toString(); - } - -} // SemanticModelBridgeImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java deleted file mode 100644 index 82b4ddbe206..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/SimpleSemanticModelElementImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement; - -/** - * An implementation of the model object ' - * Simple Semantic Model Element'. - *

    - * The following features are implemented: - *

      - *
    • - * {@link org.eclipse.papyrus.conversion.di2.impl.SimpleSemanticModelElementImpl#getTypeinfo - * Typeinfo}
    • - *
    - *

    - * - * @generated - */ -public class SimpleSemanticModelElementImpl extends SemanticModelBridgeImpl implements SimpleSemanticModelElement { - - /** - * The default value of the '{@link #getTypeinfo() Typeinfo}' attribute. - * - * @see #getTypeinfo() - * @generated - * @ordered - */ - protected static final String TYPEINFO_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTypeinfo() Typeinfo}' attribute. - * - * @see #getTypeinfo() - * @generated - * @ordered - */ - protected String typeinfo = TYPEINFO_EDEFAULT; - - /** - * - * - * @generated - */ - protected SimpleSemanticModelElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.SIMPLE_SEMANTIC_MODEL_ELEMENT; - } - - /** - * - * - * @generated - */ - public String getTypeinfo() { - return typeinfo; - } - - /** - * - * - * @generated - */ - public void setTypeinfo(String newTypeinfo) { - String oldTypeinfo = typeinfo; - typeinfo = newTypeinfo; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO, - oldTypeinfo, typeinfo)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: - return getTypeinfo(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: - setTypeinfo((String) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: - setTypeinfo(TYPEINFO_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO: - return TYPEINFO_EDEFAULT == null ? typeinfo != null : !TYPEINFO_EDEFAULT.equals(typeinfo); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (typeinfo: "); - result.append(typeinfo); - result.append(')'); - return result.toString(); - } - -} // SimpleSemanticModelElementImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java deleted file mode 100644 index e4f1e5e3b77..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/TextElementImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.TextElement; - -/** - * An implementation of the model object 'Text Element'. - * - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.TextElementImpl#getText Text}
    • - *
    - *

    - * - * @generated - */ -public class TextElementImpl extends LeafElementImpl implements TextElement { - - /** - * The default value of the '{@link #getText() Text}' attribute. - * - * @see #getText() - * @generated - * @ordered - */ - protected static final String TEXT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getText() Text}' attribute. - * - * - * @see #getText() - * @generated - * @ordered - */ - protected String text = TEXT_EDEFAULT; - - /** - * - * - * @generated - */ - protected TextElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.TEXT_ELEMENT; - } - - /** - * - * - * @generated - */ - public String getText() { - return text; - } - - /** - * - * - * @generated - */ - public void setText(String newText) { - String oldText = text; - text = newText; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.TEXT_ELEMENT__TEXT, oldText, text)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.TEXT_ELEMENT__TEXT: - return getText(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.TEXT_ELEMENT__TEXT: - setText((String) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.TEXT_ELEMENT__TEXT: - setText(TEXT_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.TEXT_ELEMENT__TEXT: - return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (text: "); - result.append(text); - result.append(')'); - return result.toString(); - } - -} // TextElementImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java deleted file mode 100644 index 3d621c99157..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/impl/Uml1SemanticModelBridgeImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.impl; - - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.papyrus.conversion.di2.Di2Package; -import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; -import org.eclipse.uml2.uml.Element; - -/** - * An implementation of the model object ' - * Uml1 Semantic Model Bridge'. - *

    - * The following features are implemented: - *

      - *
    • {@link org.eclipse.papyrus.conversion.di2.impl.Uml1SemanticModelBridgeImpl#getElement - * Element}
    • - *
    - *

    - * - * @generated - */ -public class Uml1SemanticModelBridgeImpl extends SemanticModelBridgeImpl implements Uml1SemanticModelBridge { - - /** - * The cached value of the '{@link #getElement() Element}' reference. - * - * @see #getElement() - * @generated - * @ordered - */ - protected Element element; - - /** - * - * - * @generated - */ - protected Uml1SemanticModelBridgeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return Di2Package.Literals.UML1_SEMANTIC_MODEL_BRIDGE; - } - - /** - * - * - * @generated - */ - public Element getElement() { - if (element != null && element.eIsProxy()) { - InternalEObject oldElement = (InternalEObject) element; - element = (Element) eResolveProxy(oldElement); - if (element != oldElement) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, - Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT, oldElement, element)); - } - } - return element; - } - - /** - * - * - * @generated - */ - public Element basicGetElement() { - return element; - } - - /** - * - * - * @generated - */ - public void setElement(Element newElement) { - Element oldElement = element; - element = newElement; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT, - oldElement, element)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: - if (resolve) - return getElement(); - return basicGetElement(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: - setElement((Element) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: - setElement((Element) null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE__ELEMENT: - return element != null; - } - return super.eIsSet(featureID); - } - -} // Uml1SemanticModelBridgeImpl diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java deleted file mode 100644 index a93a23f7947..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2AdapterFactory.java +++ /dev/null @@ -1,481 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.util; - - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.conversion.di2.*; - -/** - * The Adapter Factory for the model. It provides an adapter - * createXXX method for each class of the model. - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package - * @generated - */ -public class Di2AdapterFactory extends AdapterFactoryImpl { - - /** - * The cached model package. - * - * @generated - */ - protected static Di2Package modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * @generated - */ - public Di2AdapterFactory() { - if (modelPackage == null) { - modelPackage = Di2Package.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. This implementation returns true if the object is either the model's package - * or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject) object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch the delegates to the createXXX methods. - * - * @generated - */ - protected Di2Switch modelSwitch = new Di2Switch() { - - @Override - public Adapter caseDiagramElement(DiagramElement object) { - return createDiagramElementAdapter(); - } - - @Override - public Adapter caseGraphElement(GraphElement object) { - return createGraphElementAdapter(); - } - - @Override - public Adapter caseReference(Reference object) { - return createReferenceAdapter(); - } - - @Override - public Adapter caseProperty(Property object) { - return createPropertyAdapter(); - } - - @Override - public Adapter caseGraphEdge(GraphEdge object) { - return createGraphEdgeAdapter(); - } - - @Override - public Adapter caseGraphConnector(GraphConnector object) { - return createGraphConnectorAdapter(); - } - - @Override - public Adapter caseGraphNode(GraphNode object) { - return createGraphNodeAdapter(); - } - - @Override - public Adapter caseDiagramLink(DiagramLink object) { - return createDiagramLinkAdapter(); - } - - @Override - public Adapter caseDiagram(Diagram object) { - return createDiagramAdapter(); - } - - @Override - public Adapter caseSemanticModelBridge(SemanticModelBridge object) { - return createSemanticModelBridgeAdapter(); - } - - @Override - public Adapter caseSimpleSemanticModelElement(SimpleSemanticModelElement object) { - return createSimpleSemanticModelElementAdapter(); - } - - @Override - public Adapter caseUml1SemanticModelBridge(Uml1SemanticModelBridge object) { - return createUml1SemanticModelBridgeAdapter(); - } - - @Override - public Adapter caseCoreSemanticModelBridge(CoreSemanticModelBridge object) { - return createCoreSemanticModelBridgeAdapter(); - } - - @Override - public Adapter caseLeafElement(LeafElement object) { - return createLeafElementAdapter(); - } - - @Override - public Adapter caseTextElement(TextElement object) { - return createTextElementAdapter(); - } - - @Override - public Adapter caseImage(Image object) { - return createImageAdapter(); - } - - @Override - public Adapter caseGraphicPrimitive(GraphicPrimitive object) { - return createGraphicPrimitiveAdapter(); - } - - @Override - public Adapter casePolilyne(Polilyne object) { - return createPolilyneAdapter(); - } - - @Override - public Adapter caseEllipse(Ellipse object) { - return createEllipseAdapter(); - } - - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject) target); - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramElement Diagram Element}'. - * This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.DiagramElement - * @generated - */ - public Adapter createDiagramElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphElement Graph Element}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.GraphElement - * @generated - */ - public Adapter createGraphElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Reference Reference}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Reference - * @generated - */ - public Adapter createReferenceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Property Property}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Property - * @generated - */ - public Adapter createPropertyAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphEdge Graph Edge}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.GraphEdge - * @generated - */ - public Adapter createGraphEdgeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphConnector Graph Connector}'. - * This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.GraphConnector - * @generated - */ - public Adapter createGraphConnectorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphNode Graph Node}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.GraphNode - * @generated - */ - public Adapter createGraphNodeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.DiagramLink Diagram Link}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.DiagramLink - * @generated - */ - public Adapter createDiagramLinkAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Diagram Diagram}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Diagram - * @generated - */ - public Adapter createDiagramAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.SemanticModelBridge - * Semantic Model Bridge}'. This default implementation returns - * null so that we can easily ignore cases; it's useful to ignore a case when inheritance will - * catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.SemanticModelBridge - * @generated - */ - public Adapter createSemanticModelBridgeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement - * Simple Semantic Model Element}'. This default implementation - * returns null so that we can easily ignore cases; it's useful to ignore a case when - * inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.SimpleSemanticModelElement - * @generated - */ - public Adapter createSimpleSemanticModelElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge - * Uml1 Semantic Model Bridge}'. This default implementation - * returns null so that we can easily ignore cases; it's useful to ignore a case when - * inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge - * @generated - */ - public Adapter createUml1SemanticModelBridgeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge - * Core Semantic Model Bridge}'. This default implementation - * returns null so that we can easily ignore cases; it's useful to ignore a case when - * inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.CoreSemanticModelBridge - * @generated - */ - public Adapter createCoreSemanticModelBridgeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.LeafElement Leaf Element}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.LeafElement - * @generated - */ - public Adapter createLeafElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.TextElement Text Element}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.TextElement - * @generated - */ - public Adapter createTextElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Image Image}'. This default implementation returns null so that we can easily ignore cases; it's useful - * to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Image - * @generated - */ - public Adapter createImageAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.GraphicPrimitive Graphic Primitive}'. - * This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.GraphicPrimitive - * @generated - */ - public Adapter createGraphicPrimitiveAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Polilyne Polilyne}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Polilyne - * @generated - */ - public Adapter createPolilyneAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' - * {@link org.eclipse.papyrus.conversion.di2.Ellipse Ellipse}'. This default implementation returns null so that we can easily ignore - * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.conversion.di2.Ellipse - * @generated - */ - public Adapter createEllipseAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. This default - * implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} // Di2AdapterFactory diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java deleted file mode 100644 index 2f674ca01f2..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2/src/org/eclipse/papyrus/conversion/di2/util/Di2Switch.java +++ /dev/null @@ -1,574 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.conversion.di2.util; - - -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.conversion.di2.*; - -/** - * The Switch for the model's inheritance hierarchy. It supports the - * call {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for - * each class of the model, starting with the actual class of the object and proceeding up the - * inheritance hierarchy until a non-null result is returned, which is the result of the switch. - * - * - * @see org.eclipse.papyrus.conversion.di2.Di2Package - * @generated - */ -public class Di2Switch { - - /** - * The cached model package - * - * @generated - */ - protected static Di2Package modelPackage; - - /** - * Creates an instance of the switch. - * - * @generated - */ - public Di2Switch() { - if (modelPackage == null) { - modelPackage = Di2Package.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; - * it yields that result. - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; - * it yields that result. - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } else { - List eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; - * it yields that result. - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case Di2Package.DIAGRAM_ELEMENT: { - DiagramElement diagramElement = (DiagramElement) theEObject; - T result = caseDiagramElement(diagramElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.GRAPH_ELEMENT: { - GraphElement graphElement = (GraphElement) theEObject; - T result = caseGraphElement(graphElement); - if (result == null) - result = caseDiagramElement(graphElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.REFERENCE: { - Reference reference = (Reference) theEObject; - T result = caseReference(reference); - if (result == null) - result = caseDiagramElement(reference); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.PROPERTY: { - Property property = (Property) theEObject; - T result = caseProperty(property); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.GRAPH_EDGE: { - GraphEdge graphEdge = (GraphEdge) theEObject; - T result = caseGraphEdge(graphEdge); - if (result == null) - result = caseGraphElement(graphEdge); - if (result == null) - result = caseDiagramElement(graphEdge); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.GRAPH_CONNECTOR: { - GraphConnector graphConnector = (GraphConnector) theEObject; - T result = caseGraphConnector(graphConnector); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.GRAPH_NODE: { - GraphNode graphNode = (GraphNode) theEObject; - T result = caseGraphNode(graphNode); - if (result == null) - result = caseGraphElement(graphNode); - if (result == null) - result = caseDiagramElement(graphNode); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.DIAGRAM_LINK: { - DiagramLink diagramLink = (DiagramLink) theEObject; - T result = caseDiagramLink(diagramLink); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.DIAGRAM: { - Diagram diagram = (Diagram) theEObject; - T result = caseDiagram(diagram); - if (result == null) - result = caseGraphNode(diagram); - if (result == null) - result = caseGraphElement(diagram); - if (result == null) - result = caseDiagramElement(diagram); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.SEMANTIC_MODEL_BRIDGE: { - SemanticModelBridge semanticModelBridge = (SemanticModelBridge) theEObject; - T result = caseSemanticModelBridge(semanticModelBridge); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.SIMPLE_SEMANTIC_MODEL_ELEMENT: { - SimpleSemanticModelElement simpleSemanticModelElement = (SimpleSemanticModelElement) theEObject; - T result = caseSimpleSemanticModelElement(simpleSemanticModelElement); - if (result == null) - result = caseSemanticModelBridge(simpleSemanticModelElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.UML1_SEMANTIC_MODEL_BRIDGE: { - Uml1SemanticModelBridge uml1SemanticModelBridge = (Uml1SemanticModelBridge) theEObject; - T result = caseUml1SemanticModelBridge(uml1SemanticModelBridge); - if (result == null) - result = caseSemanticModelBridge(uml1SemanticModelBridge); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.CORE_SEMANTIC_MODEL_BRIDGE: { - CoreSemanticModelBridge coreSemanticModelBridge = (CoreSemanticModelBridge) theEObject; - T result = caseCoreSemanticModelBridge(coreSemanticModelBridge); - if (result == null) - result = caseSemanticModelBridge(coreSemanticModelBridge); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.LEAF_ELEMENT: { - LeafElement leafElement = (LeafElement) theEObject; - T result = caseLeafElement(leafElement); - if (result == null) - result = caseDiagramElement(leafElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.TEXT_ELEMENT: { - TextElement textElement = (TextElement) theEObject; - T result = caseTextElement(textElement); - if (result == null) - result = caseLeafElement(textElement); - if (result == null) - result = caseDiagramElement(textElement); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.IMAGE: { - Image image = (Image) theEObject; - T result = caseImage(image); - if (result == null) - result = caseLeafElement(image); - if (result == null) - result = caseDiagramElement(image); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.GRAPHIC_PRIMITIVE: { - GraphicPrimitive graphicPrimitive = (GraphicPrimitive) theEObject; - T result = caseGraphicPrimitive(graphicPrimitive); - if (result == null) - result = caseLeafElement(graphicPrimitive); - if (result == null) - result = caseDiagramElement(graphicPrimitive); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.POLILYNE: { - Polilyne polilyne = (Polilyne) theEObject; - T result = casePolilyne(polilyne); - if (result == null) - result = caseGraphicPrimitive(polilyne); - if (result == null) - result = caseLeafElement(polilyne); - if (result == null) - result = caseDiagramElement(polilyne); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Di2Package.ELLIPSE: { - Ellipse ellipse = (Ellipse) theEObject; - T result = caseEllipse(ellipse); - if (result == null) - result = caseGraphicPrimitive(ellipse); - if (result == null) - result = caseLeafElement(ellipse); - if (result == null) - result = caseDiagramElement(ellipse); - if (result == null) - result = defaultCase(theEObject); - return result; - } - default: - return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Diagram Element'. - * This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Diagram Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseDiagramElement(DiagramElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Graph Element'. - * This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Graph Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphElement(GraphElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Reference'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Reference'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseReference(Reference object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Property'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Property'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProperty(Property object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Graph Edge'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Graph Edge'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphEdge(GraphEdge object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Graph Connector'. - * This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Graph Connector'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphConnector(GraphConnector object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Graph Node'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Graph Node'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphNode(GraphNode object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Diagram Link'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Diagram Link'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseDiagramLink(DiagramLink object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Diagram'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Diagram'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseDiagram(Diagram object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' - * Semantic Model Bridge'. This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of ' - * Semantic Model Bridge'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSemanticModelBridge(SemanticModelBridge object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' - * Simple Semantic Model Element'. This implementation returns - * null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of ' - * Simple Semantic Model Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSimpleSemanticModelElement(SimpleSemanticModelElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' - * Uml1 Semantic Model Bridge'. This implementation returns - * null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of ' - * Uml1 Semantic Model Bridge'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseUml1SemanticModelBridge(Uml1SemanticModelBridge object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' - * Core Semantic Model Bridge'. This implementation returns - * null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of ' - * Core Semantic Model Bridge'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCoreSemanticModelBridge(CoreSemanticModelBridge object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Leaf Element'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Leaf Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLeafElement(LeafElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Text Element'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Text Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTextElement(TextElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Image'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Image'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseImage(Image object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Graphic Primitive'. - * This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Graphic Primitive'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphicPrimitive(GraphicPrimitive object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Polilyne'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Polilyne'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePolilyne(Polilyne object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Ellipse'. This implementation returns null; returning a non-null result will - * terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Ellipse'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseEllipse(Ellipse object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will - * terminate the switch, but this is the last case anyway. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) { - return null; - } - -} // Di2Switch diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.classpath b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.project b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.project deleted file mode 100644 index afabadc6203..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.papyrus.conversion.di2todi - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.api.tools.apiAnalysisBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.api.tools.apiAnalysisNature - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF deleted file mode 100644 index bad2bb38a43..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/META-INF/MANIFEST.MF +++ /dev/null @@ -1,28 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.papyrus.conversion.di2todi;singleton:=true -Bundle-Version: 0.8.0.qualifier -Bundle-Activator: org.eclipse.papyrus.conversion.di2todi.Activator -Bundle-Vendor: %pluginProvider -Require-Bundle: org.eclipse.m2m.qvt.oml;bundle-version="3.0.0", - org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources, - org.eclipse.m2m.qvt.oml.runtime;bundle-version="2.1.0", - org.eclipse.uml2.uml;bundle-version="3.1.0", - org.eclipse.gmf.runtime.notation;bundle-version="1.4.0", - org.eclipse.m2m.qvt.oml.emf.util;bundle-version="2.0.100", - org.eclipse.papyrus.conversion.di2, - org.eclipse.papyrus.uml.diagram.clazz;bundle-version="0.10.1" -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Import-Package: junit.framework, - org.apache.commons.io, - org.eclipse.draw2d.geometry, - org.eclipse.gmf.runtime.diagram.ui.view.factories, - org.eclipse.m2m.internal.qvt.oml.common, - org.eclipse.m2m.internal.qvt.oml.common.io, - org.eclipse.m2m.internal.qvt.oml.project.builder, - org.eclipse.m2m.internal.qvt.oml.project.nature, - org.eclipse.m2m.qvt.oml.debug.core.launch diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto deleted file mode 100644 index f0837e19292..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdgeVisualIDs.qvto +++ /dev/null @@ -1,39 +0,0 @@ - ---Author Manel Fredj-CEA LIST - -library VisualIDs; - ---for an association -property VisualId_Edge_Association : String = "4001"; -property VisualId_Edge_Association_DecoNode1 : String = "6001"; -property VisualId_Edge_Association_DecoNode2 : String = "6002"; -property VisualId_Edge_Association_DecoNode3 : String = "6003"; -property VisualId_Edge_Association_DecoNode4 : String = "6005"; -property VisualId_Edge_Association_DecoNode5 : String = "6033"; -property VisualId_Edge_Association_DecoNode6 : String = "6034"; - ---for a generalization within class diagram -property VisualId_Edge_Generalization : String = "4002"; -property VisualId_Edge_Generalization_DecoNode : String = "6007"; - ---for a dependency -property VisualId_Edge_Dependency : String = "4008"; -property VisualId_Edge_Dependency_DecoNode1 : String = "6026"; -property VisualId_Edge_Dependency_DecoNode2 : String = "6027"; - ---for a realization -property VisualId_Edge_Realization : String = "4005"; - -property VisualId_Edge_Realization_DecoNode1 : String = "6012"; -property VisualId_Edge_Realization_DecoNode2 : String = "6013"; - ---for a link (different for profile and class!) -property VisualId_CEdge_Link : String = "4013"; -property VisualId_PEdge_Link : String = "1022"; - ---for a package import -property VisualId_Edge_PackageImport : String = "1065"; -property VisualId_Edge_PackageImport_DecoNode : String = "6022"; - ---for an extension -property VisualId_Edge_Extension : String = "1013"; \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto deleted file mode 100644 index 046a85c23ba..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassAndProfileDiagEdges.qvto +++ /dev/null @@ -1,280 +0,0 @@ ---Author Manel Fredj-CEA LIST - -library HelpersEdge; -import GeneralMappingsandHelpers; -import NotationQueries; -import ClassAndProfileDiagEdgeVisualIDs; - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - ---class and profile have identical visual IDs for relationships ---Since the profile diagram has been developed starting with a class diagram. This ---is not the case for other diagram types -mapping di2::GraphEdge::classAndProfileDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector -{ - --setting the type and children - if (self.getElement() != null) then { - - if (self.getElement().isGeneralization()) then { - type := VisualId_Edge_Generalization; - --adding children - children := setChildrenForGeneralization(); - } endif; - if (self.getElement().oclIsTypeOf(uml::Extension)) then { - type := VisualId_Edge_Extension; - --adding children - // children := setChildrenForExtension(); - } else { - // extension is also an association, use "else" (else if is unfortunatley not supported in QVTO) - if (self.getElement().isAssociation()) then { - type := VisualId_Edge_Association; - children := setChildrenForAssociation(); - } endif; - } endif; - if (self.getElement().oclIsTypeOf(uml::PackageImport)) then { - type := VisualId_Edge_PackageImport; - children := setChildrenForPackageImport(); - } endif; - if (self.getElement().isDependency()) then { - type := VisualId_Edge_Dependency; - --adding children - children := setChildrenForDependency(); - } endif; - if (self.getElement().isRealization()) then { - type := VisualId_Edge_Realization; - --adding children - children := setChildrenForRealization(); - } endif; - } - else { - --it is a link - var diagType : String = self.getDiagramtype (); - if (diagType = ClassDiagram_P2) then { - type := VisualId_CEdge_Link; - } - else { - if (diagType = ProfileDiagram_P2) then { - type := VisualId_PEdge_Link; - } endif; - } endif; - element := null; - } endif; - - --setting the source and target Anchors - var anchors : OrderedSet (di2::GraphConnector) := self.anchor; - anchors->forEach (gc) { - --log("the anchor is "+ gc.graphElement.repr()); - gc.graphElement; - }; - source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - --adding style - styles := setStyleForEdge(); - - --adding element: already done in View - - --adding the bend points - bendpoints := setBendpointsForEdge(); - - --adding the source and target Anchor - sourceAnchor := setSourceAnchor(); - targetAnchor := setTargetAnchor(); -} - - ---Helpers related to an Edge --------------------------------- - - ---generic helper for an edge with two children ---takes as input the visual ids of the the two children - -helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) -{ - var child1 := object notation::DecorationNode { - --the id is set automatically - type := VisualId1; - layoutConstraint := object notation::Location { - y := 40; - }; - }; - - --second child - var child2 :=object notation::DecorationNode { - --the id is set automatically - type := VisualId2; - layoutConstraint := object notation::Location { - y := 60; - }; - }; - - return OrderedSet {child1,child2}; -} - -helper setChildrenForRealization(): OrderedSet(notation::Node) -{ - return setChildrenForEdge2Children(VisualId_Edge_Realization_DecoNode1, VisualId_Edge_Realization_DecoNode2); - -} - -helper setChildrenForDependency(): OrderedSet(notation::Node) -{ - -- - -- - -- - -- - -- - -- - return setChildrenForEdge2Children(VisualId_Edge_Dependency_DecoNode1, VisualId_Edge_Dependency_DecoNode2); - -} - -helper setChildrenForGeneralization(): OrderedSet(notation::Node) -{ - -- - -- - -- - - var child1 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_Edge_Generalization_DecoNode; - layoutConstraint := object notation::Location { - y := 40; - }; - }; - - return OrderedSet {child1}; -} - - -helper setChildrenForAssociation(): OrderedSet(notation::Node) -{ - ---------------------------------------------------------------------- - --under an Edge "association" - ----------------------------------------------------------------------- - --In the case that we have an association we will have: - --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: - -- 6 "children" typed with decoration nodes - -- 1 "styles - -- 1 element - -- 1 bendpoints - -- 1 sourceAnchor - -- 1 targetAnchor - ----------------------------------------------------------------------- - - --first child - var child1 := object notation::DecorationNode { - --the id is set automatically - type := VisualId_Edge_Association_DecoNode1; - layoutConstraint := object notation::Location { - y := -20; - }; - }; - - --second child - var child2 :=object notation::DecorationNode { - --association label - type := VisualId_Edge_Association_DecoNode2; - layoutConstraint := object notation::Location { - y := 20; - }; - // make label of association itself (not its endpoints) non visible by default - visible := false; - }; - - --third child - var child3 := object notation::DecorationNode { - --label first association end - type := VisualId_Edge_Association_DecoNode3; - layoutConstraint := object notation::Location { - y := -20; - }; - eAnnotations += noTypeEAnnotation(); - }; - - --fourth child - var child4 := object notation::DecorationNode { - --label 2nd association end - type := VisualId_Edge_Association_DecoNode4; - layoutConstraint := object notation::Location { - y := 20; - }; - eAnnotations += noTypeEAnnotation(); - }; - - --fifth child - var child5 := object notation::DecorationNode { - --multiplicity first association end - type := VisualId_Edge_Association_DecoNode5; - visible := false; - --layoutConstraint := object notation::Location{ - --y := 20; - --x := 20; - --}; - }; - - --sixth child - var child6 := object notation::DecorationNode { - --the id is set automatically - --multiplicity 2nd association end - type := VisualId_Edge_Association_DecoNode6; - visible := false; - --layoutConstraint := object notation::Location { - --y := -20; - --x := -20; - --}; - }; - - --add the set of children to the node - return OrderedSet { - child1, child2, child3, child4, child5, child6 - }; -} - - -helper setStyleForEdge() : OrderedSet(notation::Style) -{ - -- - var style := object notation::FontStyle { - --the id is set automatically - --fontName="Sans Serif"; - }; - - return OrderedSet{style}; -} - -helper setSourceAnchor() : notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setTargetAnchor():notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setBendpointsForEdge():notation::RelativeBendpoints -{ - -- - // var pts : notation::RelativeBendpointList; - // var bendpoints:=object notation::RelativeBendpoints { }; - var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); - - return bendpoints; -} - -helper setChildrenForPackageImport(): OrderedSet(notation::Node) -{ - var child1 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_Edge_PackageImport_DecoNode; - }; - - return OrderedSet {child1}; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto deleted file mode 100644 index 8c7168fa8fd..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagNodes.qvto +++ /dev/null @@ -1,658 +0,0 @@ ---Author Manel Fredj-CEA LIST -library HelpersClassDiagram; - - -import ClassDiagVisualIDs; -import NotationQueries; -import GeneralMappingsandHelpers; - - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -mapping di2::GraphNode::classDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape -{ - eAnnotations := setEAnnotations (); - - if (self.getElement().oclIsTypeOf(uml::Class)) then { - type := VisualId_Class; - children := setChildrenForClass(self); - styles := setStylesForClass(); - } endif; - if (self.getElement().oclIsTypeOf(uml::Comment)) then { - type := VisualId_Comment; - children := setChildrenForComment(); - } endif; - if (self.getElement().oclIsTypeOf(uml::Profile)) then { - type := VisualId_Profile; - children := setChildrenForProfile(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Stereotype)) then { - type := VisualId_Stereotype; - children := setChildrenForStereotype(); - } endif; - if (self.getElement().oclIsTypeOf(uml::Package)) then { - type := VisualId_Package; - children := setChildrenForPackage(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Enumeration)) then { - type := VisualId_Enum; - children := setChildrenForEnum(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Interface)) then { - type := VisualId_Interface; - children := setChildrenForInterface(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::PrimitiveType)) then { - type := VisualId_PrimitiveType; - children := setChildrenForPrimitiveType(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::DataType)) then { - type := VisualId_DataType; - children := setChildrenForDataType(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Model)) then { - type := VisualId_Package; - } endif; - if (self.getElement().oclIsTypeOf(uml::Component)) then { - type := VisualId_Component; - children := setChildrenForComponent(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::RedefinableTemplateSignature)) then { - type := VisualId_RedefinableTemplateSig; - children := setChildrenForRedefinableTemplateSignature(self); - } endif; -} - - ---for a class ---first argument is related to the contained operations which are integrated in the third child, i.e. the ---basic compartment typed 7018 -helper setChildrenForClass (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Class_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Class_Attributes; - --the id is set automatically - --set the properties - children := setAttributesForClass(node); - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint:=object notation::Bounds {}; - }; - - -- third child includes operations - var child3 := object notation::BasicCompartment { - type := VisualId_Class_Operations; - --the id is set automatically - --set the operations - children := setOperationsForClass(node); - --set the styles - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- fourth child - var child4 := object notation::BasicCompartment { - type := VisualId_Class_UseCase; - --the id is set automatically - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, - style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - return OrderedSet { - child1, child2, child3, child4 - }; -} - - - ---for a ForRedefinableTemplateSignature - -helper setChildrenForRedefinableTemplateSignature (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - var containedCTP:= object notation::DecorationNode { - type:=VisualId_ContainerofCTP; - - children:= setClassifierTemplateParameters(node); - - var style1 := object notation::SortingStyle { - }; - var style2 := object notation::FilteringStyle { - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint:=object notation::Bounds {}; - - }; - var containedCTPs : OrderedSet(notation::Node); - containedCTPs += containedCTP; - return containedCTPs; -} - -helper setClassifierTemplateParameters(in node:di2::GraphNode):OrderedSet (notation::Node){ - var CTPShapes : OrderedSet(notation::Shape); - var containedCTPs : OrderedSet(ecore::EObject) := node.getClassifierTemplateParameter(); - containedCTPs->forEach (CTP) { - -- - -- - -- - -- - - var CTPShape := object notation::Shape { - type := VisualId_ClassifierTemplateParameter; - element := CTP; - layoutConstraint := object notation::Location {}; - }; - - CTPShapes += CTPShape; - }; - - return CTPShapes; -} - ---for a primitive type -helper setChildrenForPrimitiveType (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_PrimitiveTypeChild; - --the id is set automatically - }; - - --add the set of children to the node - return OrderedSet { - child1 - }; -} - ---for a data type -helper setChildrenForDataType (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := "5035"; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := "7020"; - --the id is set automatically - --set the operations - children := setAttributesForClass(node); - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint:=object notation::Bounds {}; - }; - - -- third child includes operations - var child3 := object notation::BasicCompartment { - type := "7021"; - --the id is set automatically - --set the operations - children := setOperationsForClass(node); - --set the styles - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - --add the set of children to the node - return OrderedSet { - child1, child2, child3 - }; -} - ---for an interface -helper setChildrenForInterface (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := "5011"; - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := "7006"; - --the id is set automatically - --set the operations - children := setAttributesForClass(node); - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint:=object notation::Bounds {}; - }; - - -- third child includes operations - var child3 := object notation::BasicCompartment { - type := "7007"; - --the id is set automatically - --set the operations - children := setOperationsForClass(node); - --set the styles - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- third child includes operations - var child4 := object notation::BasicCompartment { - type := "7008"; - --the id is set automatically - --set the operations - --children := setOperationsForClass(node); - --set the styles - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - --add the set of children to the node - return OrderedSet { - child1, child2, child3, child4 - }; -} - ---for an enumeration -helper setChildrenForEnum (in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Enum_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Enum_Literals; - --set the literals - children := getLiterals(node); - var style1 := object notation::SortingStyle { }; - var style2 := object notation::FilteringStyle { }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - --the id is set automatically - }; - - --add the set of children to the node - return OrderedSet { - child1, child2 - }; -} - - -helper setStylesForClass() : OrderedSet(notation::Style) -{ - var style:=object notation::HintedDiagramLinkStyle { - --the id is set automatically - }; - - return OrderedSet{style}; -} - - ---reusable Helpers -helper setOperations(in node:di2::GraphNode,in VisualId:String): OrderedSet(notation::Node) -{ - var operationsShape : OrderedSet(notation::Node); - var containedOp : OrderedSet(ecore::EObject) := node.getOperations(); - containedOp->forEach (operation) { - var operationShape := object notation::Shape { - --an operation is typed 3013 - type := VisualId; - --fontHeight="8"; - --lineColor="0"; - element := operation; - layoutConstraint := object notation::Location{}; - }; - - operationsShape += operationShape; - }; - - return operationsShape; -} - -helper setAttributes(in node : di2::GraphNode, in VisualId:String) : OrderedSet(notation::Node) -{ - var attributesShape : OrderedSet(notation::Node); - var attributes : OrderedSet(ecore::EObject) := node.getProperties(); - attributes->forEach (attribute) { - var attributeShape := object notation::Shape { - -- an attribute is type 3012 - type := VisualId; - --fontName="Sans Serif"; - --lineColor="0"; - element := attribute; - layoutConstraint := object notation::Location{}; - }; - attributesShape += attributeShape; - }; - - return attributesShape; -} - ---in containedOp:OrderedSet(ecore::EObject) -helper setOperationsForClass(in node:di2::GraphNode): OrderedSet(notation::Node) -{ - return setOperations(node,VisualId_Class_Operation); -} - ---in containedAttr:OrderedSet (ecore::EObject) -helper setAttributesForClass(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - return setAttributes(node,VisualId_Class_Attribute); -} - ---for Enumeration ---in containedAttr:OrderedSet (ecore::EObject) -helper getLiterals(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - var enumLiteralsShape : OrderedSet(notation::Node); - var enumLiterals : OrderedSet(ecore::EObject) := node.getEnumLiterals(); - enumLiterals->forEach (enumLiteral) { - var enumLiteralShape := object notation::Shape { - -- an attribute is typed 3017 - type := VisualId_EnumLiteral; - --fontName="Sans Serif"; - --lineColor="0"; - element := enumLiteral; - layoutConstraint := object notation::Location{}; - }; - enumLiteralsShape += enumLiteralShape; - }; - - return enumLiteralsShape; -} - ---for a component -helper setChildrenForComponent (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Component_child1; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Component_child2; - --the id is set automatically - --set the properties - children := setAttributesForComponent(node); - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- third child - var child3 := object notation::BasicCompartment { - type := VisualId_Component_child3; - --the id is set automatically - --set the operations - children := setOperationsForComponent(node); - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- fourth child - var child4 := object notation::BasicCompartment { - type := VisualId_Component_child4; - --the id is set automatically - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - return OrderedSet { - child1, child2,child3,child4 - }; -} - ---in containedOp:OrderedSet(ecore::EObject) -helper setOperationsForComponent(in node:di2::GraphNode): OrderedSet(notation::Node) -{ - return setOperations(node,VisualId_Component_Operation); -} - ---in containedAttr:OrderedSet (ecore::EObject) -helper setAttributesForComponent(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - return setAttributes(node, VisualId_Component_Attribute); -} - - ---for a stereotype -helper setChildrenForStereotype() : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Stereotype_child1; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Stereotype_child2; - --the id is set automatically - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - - }; - - -- third child - var child3 := object notation::BasicCompartment { - type := VisualId_Stereotype_child3; - --the id is set automatically - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- fourth child - var child4 := object notation::BasicCompartment { - type := VisualId_Stereotype_child4; - --the id is set automatically - var style1 := object notation::SortingStyle { - --the id is set automatically - }; - var style2 := object notation::FilteringStyle { - --the id is set automatically - }; - styles := OrderedSet { - style1, style2 - }; - layoutConstraint := object notation::Bounds {}; - }; - - return OrderedSet { - child1, child2, child3, child4 - }; -} - - ---for a profile in a class diagram -helper setChildrenForProfile (in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Profile_child1; - --the id is set automatically - }; - - -- second child - var child2 := object notation::DecorationNode { - type := VisualId_Profile_child2; - children := addStereotypestoProfile(node); - layoutConstraint := object notation::Bounds {}; - --the id is set automatically - }; - - --add the set of children to the node - return OrderedSet {child1, child2}; -} - ---stereotype -helper addStereotypestoProfile (in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - - var SetofStereotypes : OrderedSet(notation::Node); - node.contained->forEach (elem|elem.oclIsTypeOf(di2::GraphNode)) { - if (elem.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Stereotype))then{ - --create a new stereotype - var stereo:notation::Shape:=elem.oclAsType(di2::GraphNode).map classDiagNode2Shape(); - SetofStereotypes += stereo; - } endif; - }; - - return SetofStereotypes; -} - ---for a package -helper setChildrenForPackage (in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Package_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::DecorationNode { - type := VisualId_Package_Label2; - var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); - containedElements->forEach (containedElement) { - var shape : notation::Shape ::= containedElement.map classDiagNode2Shape(); - children += shape; - }; - }; - - return OrderedSet { - child1, child2 - }; -} - - ---Helpers related to a Comment --------------------------------- - -helper setChildrenForComment () : OrderedSet(notation::Node) -{ - -- - var child1 := object notation::DecorationNode { - type:=VisualId_Comment_Child; - - }; - return OrderedSet {child1}; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto deleted file mode 100644 index 9b5def30876..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ClassDiagVisualIDs.qvto +++ /dev/null @@ -1,66 +0,0 @@ - ---Author Manel Fredj-CEA LIST - -library VisualIDs; - --- for an interface -property VisualId_Interface : String = "2004"; - --- for a package -property VisualId_Package : String = "2005"; - ---for a profile -property VisualId_Profile : String = "2007"; -property VisualId_Profile_child1 : String = "5026"; -property VisualId_Profile_child2 : String = "7016"; - ---for a stereotype -property VisualId_Stereotype : String = "3010"; -property VisualId_Stereotype_child1 : String = "5014"; -property VisualId_Stereotype_child2 : String = "7011"; -property VisualId_Stereotype_child3 : String = "7012"; -property VisualId_Stereotype_child4 : String = "7013"; - --- for a class -property VisualId_Class : String = "2008"; - ---for a comment -property VisualId_Comment : String = "2012"; -property VisualId_Comment_Child : String = "5038"; --- for a data type -property VisualId_DataType : String = "2010"; - --- for a primitive type -property VisualId_PrimitiveType : String = "2009"; -property VisualId_PrimitiveTypeChild : String = "5032"; - --- for an enumeration -property VisualId_Enum : String = "2006"; -property VisualId_EnumLiteral : String = "3017"; - --- for a redefinable Template signature -property VisualId_RedefinableTemplateSig : String = "3015"; -property VisualId_ClassifierTemplateParameter : String = "3031"; -property VisualId_ContainerofCTP : String = "7014"; - ---for a component -property VisualId_Component : String ="2002"; -property VisualId_Component_child1 : String ="5005"; -property VisualId_Component_child2 : String ="7002"; -property VisualId_Component_child3 : String ="7003"; -property VisualId_Component_child4 : String ="7004"; -property VisualId_Component_Attribute : String = "3002"; -property VisualId_Component_Operation : String = "3003"; - ---for a class -property VisualId_Class_Label : String = "5029"; -property VisualId_Class_Attributes : String = "7017"; -property VisualId_Class_Operations : String = "7018"; -property VisualId_Class_UseCase : String = "7019"; - -property VisualId_Package_Label : String = "5020"; -property VisualId_Package_Label2 : String = "7009"; -property VisualId_Enum_Label : String = "5023"; -property VisualId_Enum_Literals : String = "7015"; -property VisualId_Class_Operation : String = "3013"; -property VisualId_Class_Attribute : String = "3012"; diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto deleted file mode 100644 index 1e20a5438df..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagEdges.qvto +++ /dev/null @@ -1,162 +0,0 @@ ---Author Manel Fredj-CEA LIST - -library HelpersEdge; -import GeneralMappingsandHelpers; -import CompositeDiagVisualIDs; - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - -mapping di2::GraphEdge::compositeDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector -{ - ----------------------------------------------------------------------- - --under an Edge "association" - ----------------------------------------------------------------------- - --In the case that we have an association we will have: - --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: - -- 6 "children" typed with decoration nodes - -- 1 "styles - -- 1 element - -- 1 bendpoints - --1 sourceAnchor - --1targetAnchor - ----------------------------------------------------------------------- - - --setting the type and children - if (self.getElement() != null) then { - - if (self.getElement().isGeneralization()) then { - type := VisualId_Edge_GeneralizationComp; - --adding children - children := setChildrenForGeneralization(); - } endif; - if (self.getElement().oclIsTypeOf(uml::Connector)) then { - type := VisualId_Edge_Link; - --adding children - children:=setChildrenForConnector(); - } endif; - } endif; - - --setting the source and target Anchors - var anchors : OrderedSet (di2::GraphConnector) := self.anchor; - anchors->forEach (gc) { - --log("the anchor is "+ gc.graphElement.repr()); - gc.graphElement; - }; - source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - --adding style - styles := setStyleForEdge(); - - --adding element: already done in View - - --adding the bend points - bendpoints := setBendpointsForEdge(); - - --adding the source and target Anchor - sourceAnchor := setSourceAnchor(); - targetAnchor := setTargetAnchor(); -} - - ---Helpers related to an Edge --------------------------------- - - ---generic helper for an edge with two children ---takes as input the visual ids of the the two children - -helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) -{ - var child1 := object notation::DecorationNode { - --the id is set automatically - type := VisualId1; - layoutConstraint := object notation::Location { - y := 40; - }; - }; - - --second child - var child2 :=object notation::DecorationNode { - --the id is set automatically - type := VisualId2; - layoutConstraint := object notation::Location { - y := 60; - }; - }; - - return OrderedSet {child1,child2}; -} - - -helper setChildrenForGeneralization(): OrderedSet(notation::Node) -{ - -- - -- - -- - - var child1 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_DecoNodeGeneralizationComp; - layoutConstraint := object notation::Location { - y := 40; - }; - }; - - return OrderedSet {child1}; -} - - - -helper setChildrenForConnector(): OrderedSet(notation::Node) -{ - -- - -- - -- - - var child1 := object notation::DecorationNode { - --the id is set automatically - type := VisualId_Edge_Connector_Child; - layoutConstraint := object notation::Location { - y := 60; - }; - }; - - return OrderedSet {child1}; -} - - -helper setStyleForEdge() : OrderedSet(notation::Style) -{ - -- - var style := object notation::FontStyle { - --the id is set automatically - --fontName="Sans Serif"; - }; - - return OrderedSet{style}; -} - -helper setSourceAnchor() : notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setTargetAnchor():notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setBendpointsForEdge():notation::RelativeBendpoints -{ - -- - // var pts : notation::RelativeBendpointList; - // var bendpoints:=object notation::RelativeBendpoints { }; - var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); - - return bendpoints; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto deleted file mode 100644 index 4ba6c5d3fda..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagNodes.qvto +++ /dev/null @@ -1,284 +0,0 @@ ---Author Manel Fredj-CEA LIST -library CompositeStructureDiagram; - -import Converter.Utils.ConverterLibs; -import CompositeDiagVisualIDs; -import GeneralMappingsandHelpers; - - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -mapping di2::GraphNode::compositeDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape -{ - if (self.getElement().oclIsTypeOf(uml::Class)) then { - type := VisualId_Class_Composite; - } endif; - - layoutConstraint := object notation::Bounds { - var size : notation::Size := - self.size.map dimension2Size(); - var relativeLocation: notation::Location :=null; - var location : notation::Location := - self.position.map point2Location(); - if (self.container.oclIsTypeOf(di2::GraphNode))then{ - relativeLocation:=self.container.position. map point2Location(); - x := location.x + relativeLocation.x; - y := location.y + relativeLocation.y; - }else{ - x := location.x; - y := location.y; - }endif; - width := size.width; - height := size.height; - }; - - --adding 3 eAnnotations as in class diagram - eAnnotations := setEAnnotations (); - - if (type = VisualId_Class_Composite) then { - --adding children - children := setChildrenForClassComposite(self); - --adding style - styles := setStylesForClass(); - } endif; -} - - ---------------------------------------------------------------------------- ---set children for composite class - -helper setChildrenForClassComposite(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - var childrenOfCompositeClass: OrderedSet(notation::Node); - - -- - - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Class_Composite_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Class_Composite_Compartment; - --set children as properties - children := setPropertiesForCompositeClass(node.contained); - layoutConstraint:=object notation::Bounds {}; - }; - - - childrenOfCompositeClass := OrderedSet{child1, child2}; - - - --convert ports of contained classes - var childport : notation::Node; - var itsParent : notation::Node; - node.contained->forEach (elem|elem.oclIsTypeOf(di2::GraphNode)) { - - if (elem.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Port)) then { - childport := elem.oclAsType(di2::GraphNode).map compositeDiagPort2Shape(); - var temp: di2::DiagramElement:=elem.oclAsType(di2::GraphNode).getSemanticParent(); - itsParent:= temp.oclAsType(di2::GraphNode).resolveone (notation::Node); - --add the child to the semantic parent - itsParent.children+= childport; - } endif; - }; - - --convert edges in the composite - return childrenOfCompositeClass; -} - ---in contrained attributes: properties or nested classes -helper setPropertiesForCompositeClass(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - - if(node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { - child := node.oclAsType(di2::GraphNode).map ComponentClass2Property(); - setOfChildren += child; - } endif; - if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class)) then { - child := node.oclAsType(di2::GraphNode).map ComponentClass2Class(node.oclAsType(di2::GraphNode)); - setOfChildren += child; - } endif; - }; - - return setOfChildren; -} - - ------------------------------------------------------------------------------ --- case of properties -mapping di2::GraphNode::ComponentClass2Property() : notation::Shape { - - type := VisualId_Component_Property ; - --seteAnnotation - eAnnotations := setEAnnotations (); - --setchildren - children:=setChildrenForComponentProperty(); - - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - }; - --set element - element := self.getElement().oclAsType(ecore::EObject); -} - -helper setChildrenForComponentProperty() : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_Component_Property_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Component_Property_Compartiment; - layoutConstraint:=object notation::Bounds {}; - }; - - return OrderedSet {child1, child2}; -} - - ------------------------------------------------------------------------------ --- case of nested classes - -mapping di2::GraphNode::ComponentClass2Class(in node:di2::GraphNode) : notation::Shape { - - type := VisualId_Component_Class; - --seteAnnotation - eAnnotations := setEAnnotations (); - --setchildren - children:=setChildrenForComponentClass(node); - - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - }; - - --set element - element := self.getElement().oclAsType(ecore::EObject); -} - -helper setChildrenForComponentClass(in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_Component_Class_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Component_Class_Compartiment; - - --set children as properties in the case that the nested class contains properties - children:= setPropertiesForCompositeClass(node.contained); - layoutConstraint:=object notation::Bounds {}; - }; - - return OrderedSet{child1, child2}; -} - - --------------------------------- ---ports - -mapping di2::GraphNode::compositeDiagPort2Shape() : notation::Shape { - - type := VisualId_Port; - --seteAnnotation - eAnnotations := setEAnnotations (); - --setchildren - children:=setChildrenForPort(); - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var parentLocation: notation::Location :=null; - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - var itsparent: di2::DiagramElement:=self.oclAsType(di2::GraphNode).getSemanticParent(); - parentLocation:=itsparent.oclAsType(di2::GraphNode).position. map point2Location(); - x := location.x - parentLocation.x; - y := location.y - parentLocation.y; - width := size.width; - height := size.height; - }; - --set element - element := self.getElement().oclAsType(ecore::EObject); -} - - -helper setChildrenForPort() : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_Port_child1; - layoutConstraint:=object notation::Location { - x:=25; - y:=3; - }; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Port_child2; - layoutConstraint:=object notation::Location { - x:=25; - y:=-10; - }; - }; - - return OrderedSet{child1, child2}; -} - - -helper setStylesForClass() : OrderedSet(notation::Style) -{ - var style:=object notation::HintedDiagramLinkStyle { - --the id is set automatically - }; - - return OrderedSet{style}; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto deleted file mode 100644 index 3383a9a68e5..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/CompositeDiagVisualIDs.qvto +++ /dev/null @@ -1,34 +0,0 @@ - ---Author Manel Fredj-CEA LIST - -library CompositeDiagVisualIDs; - ---for a generalization within composite diagram -property VisualId_Edge_GeneralizationComp : String = "4015"; -property VisualId_DecoNodeGeneralizationComp : String = "6024"; - ---for a link -property VisualId_Edge_Link : String = "4013"; - ---for a connector -property VisualId_Edge_Connector_Child : String = "6025"; - ---class in a composite diagram -property VisualId_Class_Composite : String = "2073"; -property VisualId_Class_Composite_Label : String = "5156"; -property VisualId_Class_Composite_Compartment : String = "7073"; - ---Property in composite diagram -property VisualId_Component_Property_Label : String = "5126"; -property VisualId_Component_Property_Compartiment : String = "7077"; -property VisualId_Component_Property : String = "3070"; - ---nested Class in composite diagram -property VisualId_Component_Class : String = "3085"; -property VisualId_Component_Class_Label : String = "5155"; -property VisualId_Component_Class_Compartiment : String = "7060"; - ---Port in composite diagram -property VisualId_Port : String = "3069"; -property VisualId_Port_child1 : String = "5125"; -property VisualId_Port_child2 : String = "6029"; diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto deleted file mode 100644 index 950b5d2c6bd..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/DiTransformations.qvto +++ /dev/null @@ -1,103 +0,0 @@ - ---Author Manel Fredj-CEA LIST - - -modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; - - -transformation Transfo(in src : di2, out target1 : notation, out target2:di); - - -mapping di2::Diagram::diagram2SashWindowsMngr(): di::SashWindowsMngr -{ - --pageRefsclassandOp - var pageRefs: Set(di::PageRef) := setPageRef(); - --pageList - pageList := setPageList(pageRefs); - - --sashModel - sashModel := setSashModel(); -} - -mapping notation::Diagram::diagram2PageRef(): di::PageRef -{ - emfPageIdentifier := self.oclAsType(ecore::EObject); -} - - -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------- Helpers for di --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- - -helper setPageList(in pagerefs:Set(di::PageRef)): di::PageList -{ - var pageList := object di::PageList { - availablePage := pagerefs; - }; - - return pageList; -}; - - -helper setPageRef(): Set(di::PageRef) -{ - var setPages : Set(di::PageRef) := Set{}; - var page: di::PageRef; - target1.rootObjects()->forEach(diagram|diagram.oclIsTypeOf(notation::Diagram)) { - --avoid empty pages for unsupported diagrams (currently deployment diagram) - if (diagram.oclAsType(notation::Diagram).type != null) then { - page := diagram.oclAsType(notation::Diagram).map diagram2PageRef(); - setPages += page; - } endif; - }; - return setPages; -}; - - -helper setSashModel(): di::SashModel -{ - var sm := object di::SashModel{ - currentSelection:= object di::TabFolder{} ; - windows := setWindows(); - }; - return sm; -}; - -helper setWindows(): Set(di::Window) -{ - var setwindows : Set(di::Window); - setwindows += setWindow(); - return setwindows; -}; - -helper setWindow() : di::Window { - - var child := object di::TabFolder { - - target1.rootObjects()->forEach(diagram|diagram.oclIsTypeOf(notation::Diagram)) { - --avoid empty pages for unsupported diagrams (currently deployment diagram) - if (diagram.oclAsType(notation::Diagram).type != null) then { - var page : di::PageRef = object di::PageRef { - emfPageIdentifier:= diagram.oclAsType(ecore::EObject) - }; - children += page; - } endif; - }; - }; - - var window := object di::Window { - children := Set { child }; - }; - return window; -}; - ---helper SetChildren(): Set(di::PageRef){ - - --var setchildren:Set(di::PageRef):=Set{}; - --var page: di::PageRef; - - --return setchildren; ---}; diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto deleted file mode 100644 index f88e9680aea..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Diagram.qvto +++ /dev/null @@ -1,213 +0,0 @@ ---Author Manel Fredj-CEA LIST -library Diagram; - -import ClassDiagNodes; -import StateDiagNodes; -import ProfileDiagNodes; -import ClassAndProfileDiagEdges; -import CompositeDiagNodes; -import StateDiagEdges; -import CompositeDiagEdges; - ---import VisualIDs; -import NotationQueries; -import GeneralMappingsandHelpers; - -modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -mapping di2::Diagram::diagram2diagram() : notation::Diagram inherits di2::GraphElement::element2View -{ - --the id is set automatically - --assign type - type := self.getDiagramtype(); - --assign name - name := self.name; - - --assign element - measurementUnit := notation::MeasurementUnit::Pixel; - - --transform contained nodes and edges - - if (type = ClassDiagram_P2) then { - children := setChildrenForClassDiagram(self.contained); - edges := setEdgesForClassAndProfileDiagram(self.contained); - } endif; - if (type = ProfileDiagram_P2) then { - children := setChildrenForProfileDiagram(self.contained); - edges := setEdgesForClassAndProfileDiagram(self.contained); - } endif; - if (type = CompositeStructure_P2) then { - children := setChildrenForCompositeDiagram(self.contained); - edges := setEdgesForCompositeDiagram(self.contained); - } endif; - if (type = StateMachineDiagram_P2) then { - children := setChildrenForStateDiagram(self.contained); - edges := setEdgesForStateDiagram(self.contained); - } endif; - - --Set Style of diagram - if (type != null) then { - styles := setStylesForDiagram(); - } endif; -} - - --------------------------------------------------------------- ---converting a composite diagram -helper setChildrenForCompositeDiagram(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - var itsParent: notation::Shape; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - --case of containing a class - if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class) ) then { - child := node.oclAsType(di2::GraphNode).map compositeDiagNode2Shape(); - setOfChildren += child; - } endif; - --case of containing a port : map the potr and attach it to the semantic parent - if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Port) ) then { - child := node.oclAsType(di2::GraphNode).map compositeDiagPort2Shape(); - var temp: di2::DiagramElement:=node.oclAsType(di2::GraphNode).getSemanticParent(); - itsParent:= temp.oclAsType(di2::GraphNode).resolveone (notation::Shape); - --add the child to the semantic parent - itsParent.children+= child; - } endif; - }; - - return setOfChildren; -} - ------------------------------------------------------------- ---converting a class diagram -helper setChildrenForClassDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - child := node.oclAsType(di2::GraphNode).map classDiagNode2Shape(); - setOfChildren += child; - }; - - return setOfChildren; -} - ------------------------------------------------------------- ---converting a profile diagram -helper setChildrenForProfileDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - child := node.oclAsType(di2::GraphNode).map profileDiagNode2Shape(); - setOfChildren += child; - }; - - return setOfChildren; -} - ---converting a state diagram -helper setChildrenForStateDiagram (in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - child := node.oclAsType(di2::GraphNode).map stateDiagNode2Shape(); - setOfChildren += child; - }; - - return setOfChildren; -} - -helper setEdgesForClassAndProfileDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) -{ - var setofEdges : OrderedSet(notation::Edge); - var edge : notation::Edge; - contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { - edge := node.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); - setofEdges += edge; - }; - contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { - composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { - edge := elem.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); - setofEdges += edge; - }; - composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { - prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { - edge := connect.oclAsType(di2::GraphEdge).map classAndProfileDiagEdge2Edge(); - setofEdges += edge; - }; - }; - }; - - return setofEdges; -} - -helper setEdgesForCompositeDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) -{ - var setofEdges : OrderedSet(notation::Edge); - var edge : notation::Edge; - contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { - edge := node.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); - setofEdges += edge; - }; - contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { - composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { - edge := elem.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); - setofEdges += edge; - }; - composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { - prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { - edge := connect.oclAsType(di2::GraphEdge).map compositeDiagEdge2Edge(); - setofEdges += edge; - }; - }; - }; - - return setofEdges; -} - -helper setEdgesForStateDiagram (in contained : OrderedSet(di2::DiagramElement)) : OrderedSet (notation::Edge) -{ - var setofEdges : OrderedSet(notation::Edge); - var edge : notation::Edge; - contained->forEach (node|node.oclIsTypeOf(di2::GraphEdge)) { - edge := node.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); - setofEdges += edge; - }; - contained->forEach (composite|composite.oclIsTypeOf(di2::GraphNode)) { - composite.oclAsType(di2::GraphNode).contained->forEach (elem|elem.oclIsTypeOf(di2::GraphEdge)) { - edge := elem.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); - setofEdges += edge; - }; - composite.oclAsType(di2::GraphNode).contained->forEach (prop|prop.oclIsTypeOf(di2::GraphNode)) { - prop.oclAsType(di2::GraphNode).contained->forEach (connect|connect.oclIsTypeOf(di2::GraphEdge)) { - edge := connect.oclAsType(di2::GraphEdge).map stateDiagEdge2Edge(); - setofEdges += edge; - }; - }; - }; - - return setofEdges; -} - --------------------------------- ---Helpers related to a diagram -helper setStylesForDiagram() : OrderedSet (notation::Style) -{ - -- - - var setofStyles : OrderedSet(notation::Style); - var style := object notation::DiagramStyle { - --the id is set automatically - }; - - setofStyles := OrderedSet{style}; - - return setofStyles; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto deleted file mode 100644 index b54734ce946..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ElementType.qvto +++ /dev/null @@ -1,25 +0,0 @@ ---Author Manel Fredj-CEA LIST - -library ElementType; - ---diagram types in notation (Papyrus MDT -- P2) -property ClassDiagram_P2 : String = "PapyrusUMLClassDiagram"; -property ProfileDiagram_P2 : String = "PapyrusUMLProfileDiagram"; -property CompositeStructure_P2 : String = "CompositeStructure"; -property ActivityDiagram_P2 : String = "PapyrusUMLActivityDiagram"; -property SequenceDiagram_P2 : String = "PapyrusUMLSequenceDiagram"; --todo: check for papyrus 2 the actual name -property ComponentDiagram_P2 : String = ""; --todo: check for papyrus 1 the actual name -property StateMachineDiagram_P2 : String = "PapyrusUMLStateMachineDiagram"; -property UseCaseDiagram_P2 : String = "UseCase"; - ---diagram types in di2 (Papyrus 1 -- P1) -property ClassDiagram_P1 : String = "ClassDiagram"; --- property ProfileDiagram_P1 --no specific diagram in P1 (class diagram), getDiagramType returns code in function of UML model -property CompositeStructure_P1 : String = "CompositeStructureDiagram"; -property ActivityDiagram_P1 : String = "ActivityDiagram"; -property SequenceDiagram_P1 : String = "SequenceDiagram"; -property ComponentDiagram_P1 : String = "ComponentDiagram"; -property StateMachineDiagram_P1 : String = "StateMachineDiagram"; -property UseCaseDiagram_P1 : String = "UseCaseDiagram"; --- does not exist in MDT --- property DeploymentDiagram_P1 : String = "DeploymentDiagram"; \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto deleted file mode 100644 index becc23eefc9..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/GeneralMappingsandHelpers.qvto +++ /dev/null @@ -1,136 +0,0 @@ ---Author Manel Fredj-CEA LIST -library GeneralMappings; - -import Converter.Utils.ConverterLibs; -import NotationQueries; - - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------- Generic Mappings --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- -abstract mapping di2::GraphElement::element2View() : notation::View -{ - --assign visibility attribute (it seems that this is not supported by Papyrus MDT - -- if false, diagram is visible but has no contents - --visible := self.isVisible; - visible := true; - - element := self.getElement().oclAsType(ecore::EObject); -} - - -mapping di2::GraphEdge::edge2Connector() : notation::Connector inherits di2::GraphElement::element2View -{ - lineColor := self.borderColor.rgb2int(); -} - -mapping di2::GraphNode::node2Shape() : notation::Shape inherits di2::GraphElement::element2View -{ - --assign colors and bounds - lineColor := self.borderColor.rgb2int(); - fillColor := self.backgroundColor.rgb2int(); - fontColor := self.fontColor.rgb2int(); - - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.oclAsType(di2::GraphNode).size.map dimension2Size(); - - var relativeLocation: notation::Location :=null; - - var location : notation::Location := self.position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - if (self.container.oclIsTypeOf(di2::GraphNode)) then { - // correct position (why necessary??) of nested items - y := y - 20; - } endif; - } -} - -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------- Mappings --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- - -mapping di2::Dimension::dimension2Size() : notation::Size -{ - width := self.dimensionGetWidth(); - height := self.dimensionGetHeight(); -} - --- transformation mapping dimension into location -mapping di2::Point::point2Location() : notation::Location -{ - x := self.pointGetX(); - y := self.pointGetY(); - -} - -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------- Helpers --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- - - ---Set EAnnotation: not specific to a diagram (it is used in class diagram and composite diagram) --------------------------------- -helper setEAnnotations() : OrderedSet (ecore::EAnnotation) -{ - -- first eAnnotation - var eAnnot1 := object ecore::EAnnotation { - --the id is set automatically - --eAnnot1.eModelElement:=self.resolveone(notation::Node); - source := "ShadowFigure"; - details := object ecore::EStringToStringMapEntry { - key := "ShadowFigure_Value"; - value := "false"; - }; - }; - - -- second annotation - var eAnnot2 := object ecore::EAnnotation { - --the id is set automatically - source := "displayNameLabelIcon"; - details := object ecore::EStringToStringMapEntry { - key := "displayNameLabelIcon_value"; - value := "false"; - }; - }; - - -- third annotation - var eAnnot3 := object ecore::EAnnotation { - -- the id is set automatically - source := "QualifiedName"; - details := object ecore::EStringToStringMapEntry { - key := "QualifiedNameDepth"; - value := "1000"; - }; - }; - - -- add the set of annotations to the node - return OrderedSet { - eAnnot1, eAnnot2, eAnnot3 - }; -} - ---suppresses showing type information for an element (used for associations by default) -helper noTypeEAnnotation() : OrderedSet (ecore::EAnnotation) -{ - var eAnnotationNoType := object ecore::EAnnotation { - --the id is set automatically - --eAnnot1.eModelElement:=self.resolveone(notation::Node); - source := "CustomAppearance_Annotation"; - details := object ecore::EStringToStringMapEntry { - key := "CustomAppearance_MaskValue"; - value := "14"; - }; - }; - return OrderedSet { - eAnnotationNoType - }; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto deleted file mode 100644 index 83f1850a146..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/NotationQueries.qvto +++ /dev/null @@ -1,168 +0,0 @@ - ---Author Manel Fredj-CEA LIST - -import ElementType; -import Converter.Utils.ConverterLibs; // for getElement - -modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -transformation Transfo(in src : di2, out target1 : notation, out target2:di); - - -------------------------------------------------------------------------------------------------------------------------- ----------------------------------------- QUERIES for notation --------------------------------------- -------------------------------------------------------------------------------------------------------------------------- - -// in Java already ---query di2::RGB::RGB2Int() : Integer ---{ --- return 0; --- -- TODO: check the conversion form RGB to int ---} - - -query di2::Diagram::getDiagramtype() : String -{ - --class diagram - if (self.type = ClassDiagram_P1) then { - if (self.getElement().oclIsTypeOf(uml::Profile)) then { - return ProfileDiagram_P2.oclAsType(String); - } - else { - return ClassDiagram_P2.oclAsType(String); - } endif; - } endif; - --composite diagram - if (self.type = CompositeStructure_P1) then { - return CompositeStructure_P2.oclAsType(String); - } endif; - --activity diagram - if (self.type = ActivityDiagram_P1) then { - return ActivityDiagram_P2.oclAsType(String); - } endif; --TODO: check for papyrus 1 le type - --sequence diagram - if (self.type = SequenceDiagram_P1) then { - return SequenceDiagram_P2.oclAsType(String); - } endif; - --component diagram - if (self.type = ComponentDiagram_P1) then { - return ComponentDiagram_P1.oclAsType(String); - } endif; --TODO: check for papyrus 2 le type - --state Machine diagram - if (self.type = StateMachineDiagram_P1) then { - return StateMachineDiagram_P2; - } endif; - --Use case diagram - if (self.type = UseCaseDiagram_P1) then { - return UseCaseDiagram_P2; - } endif; - --otherwise - return null; -} - -query di2::GraphElement::getDiagramtype() : String { - var parent : Stdlib::Element := self.container(); - - if (parent.oclIsTypeOf (di2::Diagram)) then { - return parent.oclAsType (di2::Diagram).getDiagramtype(); - } - else { - if (parent.oclIsTypeOf (di2::GraphElement)) then { - return parent.oclAsType (di2::GraphElement).getDiagramtype(); - } endif; - } endif; - return null; -} - -query di2::GraphNode::getOperations() : OrderedSet(ecore::EObject) -{ - return self.getSubElementsOfType("Operation"); -} - - -query di2::GraphNode::getProperties() : OrderedSet(ecore::EObject) -{ - return self.getSubElementsOfType("Property"); -} - -query di2::GraphNode::getEnumLiterals() : OrderedSet(ecore::EObject) -{ - return self.getSubElementsOfType("EnumerationLiteral"); -} - -query di2::GraphNode::getSubElementsOfType(type : String) : OrderedSet(ecore::EObject) -{ - var containedSubElements : OrderedSet(ecore::EObject); - var elem : uml::Element; - - self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - - if (node.oclAsType(di2::GraphNode).contained != null) then - { - var contained:OrderedSet(di2::DiagramElement) := node.oclAsType(di2::GraphNode).contained; - contained->forEach (op|op.oclIsTypeOf(di2::GraphNode)){ - elem := op.oclAsType(di2::GraphNode).semanticModel.oclAsType(di2::Uml1SemanticModelBridge).element; - if (elem.metaClassName() = type) then { - containedSubElements += elem.oclAsType(ecore::EObject); - } endif; - }; - } endif; - }; - return containedSubElements; -} - -query di2::GraphNode::getClassifierTemplateParameter():OrderedSet(ecore::EObject){ - --containedCTPs stands for contained "Classifier Template Parameters" - var containedCTPs: OrderedSet(ecore::EObject); - var elem : uml::Element; - - self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)){ - node.oclAsType(di2::GraphNode).contained->forEach(subnode|subnode.oclIsTypeOf(di2::GraphNode)) { - elem:=subnode.oclAsType(di2::GraphNode).getElement(); - if (elem.oclIsTypeOf(uml::ClassifierTemplateParameter)) then { - containedCTPs += elem.oclAsType(ecore::EObject); - } endif; - }; - }; - - return containedCTPs; -} - -query di2::GraphNode::getSemanticParent(): di2::DiagramElement { - - if (self.getElement().oclIsTypeOf(uml::RedefinableTemplateSignature)) then { - return self.semanticParent; - } endif; - - if (self.getElement().oclIsTypeOf(uml::Port))then{ - return self.semanticParent; - } endif; - - return null; -} - -query di2::GraphNode::getSubElementsOfPackage() : OrderedSet(di2::GraphNode) -{ - var containedElements : OrderedSet(di2::GraphNode); - - self.contained->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - if (node.oclAsType(di2::GraphNode).getElement().oclIsKindOf(uml::Element)) then - { - containedElements +=node.oclAsType(di2::GraphNode); - } endif; - }; - return containedElements; -} - -query di2::GraphEdge::getAnchors() -{ - var anchors:OrderedSet (di2::GraphConnector):= self.anchor; - anchors->forEach (gc) { - --log("the anchor is " + gc.metaClassName()); - }; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto deleted file mode 100644 index 162d0f27d1b..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagNodes.qvto +++ /dev/null @@ -1,273 +0,0 @@ ---Author Ansgar Radermacher - CEA LIST -library ProfileDiagram; - -import Converter.Utils.ConverterLibs; -import ProfileDiagVisualIDs; -import GeneralMappingsandHelpers; - - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -mapping di2::GraphNode::profileDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape -{ - --add 3 eAnnotations as in class diagram - eAnnotations := setEAnnotations (); - - if (self.getElement().oclIsTypeOf(uml::Stereotype)) then { - type := VisualId_Stereotype; - children := setChildrenForStereotype(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::ElementImport)) then { - // TODO: in Papyrus 1, meta-classes refer to element imports, but not all element imports are meta-classes - type := VisualId_Metaclass; - children := setChildrenForMetaclass(self); - // replace element import by meta-class reference - element := self.getSemanticModel().getMetaclassRef().oclAsType(ecore::EObject); - } endif; - if (self.getElement().oclIsTypeOf(uml::Comment)) then { - type := VisualId_Comment; - children := setChildrenForComment(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Package)) then { - type := VisualId_Package; - children := setChildrenForPackage(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Profile)) then { - type := VisualId_Profile; - children := setChildrenForProfile(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::DataType)) then { - type := VisualId_DataType; - children := setChildrenForDataType(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Enumeration)) then { - type := VisualId_Enum; - children := setChildrenForEnum(self); - } endif; -} - - ---------------------------------------------------------------------------- ---set children for stereotype - -helper setChildrenForStereotype(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Stereotype_DecoNode; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Stereotype_Label; - styles := OrderedSet { - object notation::SortingStyle { }, - object notation::FilteringStyle { } - }; - layoutConstraint := object notation::Bounds {}; - }; - - -- third child - var child3 := object notation::BasicCompartment { - type := VisualId_Stereotype_Compartment; - --set children as properties - children:= setPropertiesForStereotype(node.contained); - layoutConstraint := object notation::Bounds {}; - }; - - return OrderedSet { - child1, child2, child3 - }; -} - ---in contained attributes: properties or nested classes -helper setPropertiesForStereotype(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren : OrderedSet(notation::Node); - --var child : notation::Node; - - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - node.oclAsType(di2::GraphNode).contained->forEach (subNode|subNode.oclIsTypeOf(di2::GraphNode)) { - if(subNode.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { - var child : notation::Shape := subNode.oclAsType(di2::GraphNode).map stereotype2Property(); - -- var child : notation::Shape; - setOfChildren += child; - } endif; - }; - }; - - return setOfChildren; -} - ------------------------------------------------------------------------------ --- case of properties -mapping di2::GraphNode::stereotype2Property() : notation::Shape { - - type := VisualId_StereotypeProperty; - - --set element - element := self.getElement().oclAsType(ecore::EObject); - - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - }; -} - - -helper setChildrenForMetaclass(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Metaclass_DecoNode; - --the id is set automatically - }; - - return OrderedSet { - child1 - }; -} - -helper setChildrenForComment(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Comment_DecoNode; - --the id is set automatically - }; - - return OrderedSet { - child1 - }; -} - -helper setChildrenForProfile(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Profile_DecoNode1; - }; - var child2 := object notation::DecorationNode { - type := VisualId_Profile_DecoNode2; - - var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); - containedElements->forEach (containedElement) { - var shape : notation::Shape ::= containedElement.map profileDiagNode2Shape(); - children += shape; - }; - }; - - return OrderedSet { - child1, child2 - }; -} - -helper setChildrenForPackage(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Package_DecoNode1; - }; - var child2 := object notation::DecorationNode { - type := VisualId_Package_DecoNode2; - var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); - containedElements->forEach (containedElement) { - var shape : notation::Shape ::= containedElement.map profileDiagNode2Shape(); - children += shape; - }; - }; - - return OrderedSet { - child1, child2 - }; -} - ---------------------------------------------------------------------------- ---set children for enumeration -helper setChildrenForEnum(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - var childrenOfStereotype: OrderedSet(notation::Node); - - -- - - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Enum_DecoNode; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_Enum_BasicCompartment; - children := getEnumLiterals(node); - layoutConstraint := object notation::Bounds {}; - }; - - childrenOfStereotype := OrderedSet { - child1, child2 - }; - - --convert edges in the composite - - return childrenOfStereotype; -} - ---for enumeration literals -helper getEnumLiterals(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - var enumLiteralsShape : OrderedSet(notation::Node); - var enumLiterals : OrderedSet(ecore::EObject) := node.getEnumLiterals(); - enumLiterals->forEach (enumLiteral) { - var enumLiteralShape := object notation::Shape { - type := VisualId_EnumLiteral; - --fontName="Sans Serif"; - --lineColor="0"; - element := enumLiteral; - layoutConstraint := object notation::Location{}; - }; - enumLiteralsShape += enumLiteralShape; - }; - - return enumLiteralsShape; -} - -helper setChildrenForDataType(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_DataType_DecoNode; - }; - - -- second child - var child2 := object notation::BasicCompartment { - type := VisualId_DataType_CompartmentAttr; - --TODO set children - layoutConstraint := object notation::Bounds {}; - }; - - -- third child - var child3 := object notation::BasicCompartment { - type := VisualId_DataType_CompartmentOper; - --set children as properties - --children:= setPropertiesForStereotype(node.contained); - layoutConstraint := object notation::Bounds {}; - }; - - return OrderedSet { - child1, child2, child3 - }; -} diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto deleted file mode 100644 index 3fa75c813ef..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/ProfileDiagVisualIDs.qvto +++ /dev/null @@ -1,55 +0,0 @@ - ---Author Ansgar Radermacher-CEA LIST - -library ProfileDiagVisualIDs; - ---profile -property VisualId_Profile : String = "1030"; -property VisualId_Profile_DecoNode1 : String = "1047"; -property VisualId_Profile_DecoNode2 : String = "1042"; - ---package -property VisualId_Package : String = "2007"; -property VisualId_Package_DecoNode1 : String = "5026"; -property VisualId_Package_DecoNode2 : String = "1005"; - ---profile in package (currently unused) -property VisualId_NestedProfile : String = "1024"; -property VisualId_NestedProfile_DecoNode1 : String = "1050"; -property VisualId_NestedProfile_DecoNode2 : String = "1051"; - ---package in package (currently unused) -property VisualId_NestedPackage : String = "1012"; -property VisualId_NestedPackage_DecoNode1 : String = "1010"; -property VisualId_NestedPackage_DecoNode2 : String = "11"; - ---enumeration -property VisualId_Enum : String = "2006"; -property VisualId_Enum_DecoNode : String = "5023"; -property VisualId_Enum_BasicCompartment : String = "1063"; -property VisualId_EnumLiteral : String = "1037"; - ---stereotype -property VisualId_Stereotype : String = "1026"; -property VisualId_Stereotype_DecoNode : String = "1034"; -property VisualId_Stereotype_Label : String = "1019"; -property VisualId_Stereotype_Compartment : String = "1071"; - ---datatype -property VisualId_DataType : String = "2010"; -property VisualId_DataType_DecoNode : String = "5035"; -property VisualId_DataType_CompartmentAttr : String = "1067"; -property VisualId_DataType_CompartmentOper : String = "1068"; - ---property in stereotype -property VisualId_StereotypeProperty : String = "3002"; -property VisualId_StereotypeProperty_Label : String = "5001"; -property VisualId_StereotypeProperty_Compartment : String = "5002"; - ---metaclass -property VisualId_Metaclass : String = "1031"; -property VisualId_Metaclass_DecoNode : String = "1084"; - ---comment -property VisualId_Comment : String = "1002"; -property VisualId_Comment_DecoNode : String = "3"; diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto deleted file mode 100644 index bfbe84eb39b..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagEdges.qvto +++ /dev/null @@ -1,160 +0,0 @@ ---Author Manel Fredj-CEA LIST - -library HelpersEdge; -import GeneralMappingsandHelpers; -import StateDiagVisualIDs; - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - -mapping di2::GraphEdge::stateDiagEdge2Edge() : notation::Connector inherits di2::GraphEdge::edge2Connector -{ - ----------------------------------------------------------------------- - --under an Edge "association" - ----------------------------------------------------------------------- - --In the case that we have an association we will have: - --1 edge with a xmi:type:="notation:Connector", a geneerated Id, type= "4001", a target and a source that includes: - -- 6 "children" typed with decoration nodes - -- 1 "styles - -- 1 element - -- 1 bendpoints - --1 sourceAnchor - --1targetAnchor - ----------------------------------------------------------------------- - - --setting the type and children - if (self.getElement() != null) then { - - if (self.getElement().oclIsTypeOf(uml::Transition)) then { - type := VisualId_Edge_Transition; - --adding children - children := setChildrenForTransition(); - } endif; - } - else { - --type := VisualId_Edge_Link; - --adding children - } endif; - - --setting the source and target Anchors - var anchors : OrderedSet (di2::GraphConnector) := self.anchor; - anchors->forEach (gc) { - --log("the anchor is "+ gc.graphElement.repr()); - gc.graphElement; - }; - source := anchors->first().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - target := anchors->last().graphElement.oclAsType(di2::GraphNode).late resolveone(notation::Shape); - --adding style - styles := setStyleForEdge(); - - --adding element: already done in View - - --adding the bend points - bendpoints := setBendpointsForEdge(); - - --adding the source and target Anchor - sourceAnchor := setSourceAnchor(); - targetAnchor := setTargetAnchor(); -} - - ---Helpers related to an Edge --------------------------------- - - ---generic helper for an edge with two children ---takes as input the visual ids of the the two children - -helper setChildrenForEdge2Children(in VisualId1: String, in VisualId2: String): OrderedSet(notation::Node) -{ - var child1 := object notation::DecorationNode { - --the id is set automatically - type := VisualId1; - layoutConstraint := object notation::Location { - y := 40; - }; - }; - - --second child - var child2 :=object notation::DecorationNode { - --the id is set automatically - type := VisualId2; - layoutConstraint := object notation::Location { - y := 60; - }; - }; - - return OrderedSet {child1,child2}; -} - - -helper setChildrenForTransition(): OrderedSet(notation::Node) -{ - -- - -- - -- - - var child1 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_Edge_Transition_DecoNode1; - layoutConstraint := object notation::Location { - y := 10; - }; - }; - var child2 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_Edge_Transition_DecoNode2; - layoutConstraint := object notation::Location { - y := 20; - }; - }; - var child3 := object notation::DecorationNode { - --the id is set automatically - --type := VisualId_DecoNodeGeneralization; - type := VisualId_Edge_Transition_DecoNode3; - layoutConstraint := object notation::Location { - y := 20; - }; - }; - - return OrderedSet { - child1, child2, child3 - }; -} - - -helper setStyleForEdge() : OrderedSet(notation::Style) -{ - -- - var style := object notation::FontStyle { - --the id is set automatically - --fontName="Sans Serif"; - }; - - return OrderedSet{style}; -} - -helper setSourceAnchor() : notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setTargetAnchor():notation::Anchor -{ - return object notation::IdentityAnchor { }; -} - - -helper setBendpointsForEdge():notation::RelativeBendpoints -{ - -- - // var pts : notation::RelativeBendpointList; - // var bendpoints:=object notation::RelativeBendpoints { }; - var bendpoints := createBendpoints().oclAsType (notation::RelativeBendpoints); - - return bendpoints; -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto deleted file mode 100644 index 60802fb3c3f..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagNodes.qvto +++ /dev/null @@ -1,308 +0,0 @@ ---Author Manel Fredj-CEA LIST -library StateDiagram; - -import Converter.Utils.ConverterLibs; -import StateDiagVisualIDs; -import GeneralMappingsandHelpers; - - -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; -modeltype ecore uses 'http://www.eclipse.org/emf/2002/Ecore'; -modeltype uml uses 'http://www.eclipse.org/uml2/2.1.0/UML'; - - -mapping di2::GraphNode::stateDiagNode2Shape() : notation::Shape inherits di2::GraphNode::node2Shape -{ - --add 3 eAnnotations as in class diagram - eAnnotations := setEAnnotations (); - - if (self.getElement().oclIsTypeOf(uml::State)) then { - type := VisualId_State; - children := setChildrenForState(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::StateMachine)) then { - type := VisualId_StateMachine; - children := setChildrenForStateMachine(self); - } endif; - if (self.getElement().oclIsTypeOf(uml::Comment)) then { - -- type := VisualId_Comment; - } endif; - if (self.getElement().oclIsTypeOf(uml::Region)) then { - type := VisualId_Region; - children := setChildrenForRegion(self); - eAnnotations += object ecore::EAnnotation { - source := "RegionAnnotationKey"; - details := object ecore::EStringToStringMapEntry { - key := "RegionZoneKey"; - value := ""; - }; - }; - } endif; - if (self.getElement().oclIsTypeOf(uml::FinalState)) then { - type := VisualId_FinalState; - children := setChildrenForPseudoState (self, VisualId_FinalState_DecoNode1, VisualId_FinalState_DecoNode2); - } endif; - if (self.getElement().oclIsTypeOf(uml::ConnectionPointReference)) then { - type := VisualId_ConnectionPoint; - children := setChildrenForPseudoState (self, VisualId_ConnectionPoint_DecoNode1, VisualId_ConnectionPoint_DecoNode2); - } endif; - if (self.getElement().oclIsTypeOf(uml::Pseudostate)) then { - var pseudoState := self.getElement().oclAsType(uml::Pseudostate); - if (pseudoState.kind = uml::PseudostateKind::initial) then { - type := VisualId_InitialState; - children := setChildrenForPseudoState (self, VisualId_InitialState_DecoNode1, VisualId_InitialState_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::shallowHistory) then { - type := VisualId_ShallowHistoryState; - children := setChildrenForPseudoState (self, VisualId_ShallowHistoryState_DecoNode1, VisualId_ShallowHistoryState_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::deepHistory) then { - type := VisualId_DeepHistoryState; - children := setChildrenForPseudoState (self, VisualId_DeepHistoryState_DecoNode1, VisualId_DeepHistoryState_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::choice) then { - type := VisualId_Choice; - children := setChildrenForPseudoState (self, VisualId_Choice_DecoNode1, VisualId_Choice_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::join) then { - type := VisualId_Choice; - children := setChildrenForPseudoState (self, VisualId_Choice_DecoNode1, VisualId_Choice_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::fork) then { - type := VisualId_Fork; - children := setChildrenForPseudoState (self, VisualId_Fork_DecoNode1, VisualId_Fork_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::junction) then { - type := VisualId_Junction; - children := setChildrenForPseudoState (self, VisualId_Junction_DecoNode1, VisualId_Junction_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::terminate) then { - type := VisualId_Terminate; - children := setChildrenForPseudoState (self, VisualId_Terminate_DecoNode1, VisualId_Terminate_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::entryPoint) then { - type := VisualId_EntryPoint; - children := setChildrenForPseudoState (self, VisualId_EntryPoint_DecoNode1, VisualId_EntryPoint_DecoNode2); - } endif; - if (pseudoState.kind = uml::PseudostateKind::exitPoint) then { - type := VisualId_ExitPoint; - children := setChildrenForPseudoState (self, VisualId_ExitPoint_DecoNode1, VisualId_ExitPoint_DecoNode2); - } endif; - } endif; -} - - -helper setChildrenForPseudoState(in node : di2::GraphNode, in visualID1 : String, in visualID2 : String) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := visualID1; - layoutConstraint := object notation::Location { - x := 20 - }; - }; - var child2 := object notation::DecorationNode { - type := visualID2; - layoutConstraint := object notation::Location { - x := 20 - }; - }; - return OrderedSet { - child1, child2 - }; -}; - ---------------------------------------------------------------------------- ---set children for state - -helper setChildrenForState(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_State_DecoNode1; - }; - - -- first child - var child2 := object notation::DecorationNode { - type:=VisualId_State_DecoNode2; - }; - /* - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Class_Composite_Compartiment; - --set children as properties - children:= setPropertiesForState(node.contained); - layoutConstraint:=object notation::Bounds {}; - }; - */ - --convert edges in the composite - - return OrderedSet { - child1, child2 - }; -} - -helper setChildrenForStateMachine(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_StateMachine_DecoNode1; - }; - var child2 := object notation::DecorationNode { - type := VisualId_StateMachine_DecoNode2; - var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); - containedElements->forEach (containedElement) { - var shape : notation::Shape ::= containedElement.map stateDiagNode2Shape(); - if (shape.type != "") then { - --don't add invalid IDs - children += shape; - } endif; - }; - }; - - return OrderedSet { - child1, child2 - }; -} - -helper setChildrenForRegion(in node : di2::GraphNode) : OrderedSet(notation::Node) -{ - -- first child - var child1 := object notation::DecorationNode { - type := VisualId_Region_DecoNode; - var containedElements : OrderedSet(di2::GraphNode) := node.getSubElementsOfPackage(); - containedElements->forEach (containedElement) { - var shape : notation::Shape ::= containedElement.map stateDiagNode2Shape(); - if (shape.type != "") then { - --don't add invalid IDs - children += shape; - } endif; - }; - }; - - return OrderedSet { - child1 - }; -} - -/* ---in contrained attributes: properties or nested classes -helper setPropertiesForState(in contained:OrderedSet(di2::DiagramElement)) : OrderedSet(notation::Node) -{ - var setOfChildren:OrderedSet(notation::Node); - var child:notation::Node; - contained ->forEach (node|node.oclIsTypeOf(di2::GraphNode)) { - - if(node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Property)) then { - child := node.oclAsType(di2::GraphNode).map ComponentClass2Property(); - setOfChildren += child; - } endif; - if (node.oclAsType(di2::GraphNode).getElement().oclIsTypeOf(uml::Class)) then { - child := node.oclAsType(di2::GraphNode).map ComponentClass2Class(node.oclAsType(di2::GraphNode)); - setOfChildren += child; - } endif; - }; - - return setOfChildren; -} - - ------------------------------------------------------------------------------ --- case of properties -mapping di2::GraphNode::ComponentClass2Property() : notation::Shape { - - type := VisualId_Component_Property ; - --seteAnnotation - eAnnotations := setEAnnotations (); - --setchildren - children:=setChildrenForComponentProperty(); - - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - }; - --set element - element := self.getElement().oclAsType(ecore::EObject); -} - -helper setChildrenForComponentProperty() : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_Component_Property_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Component_Property_Compartiment; - layoutConstraint:=object notation::Bounds {}; - }; - - return OrderedSet {child1, child2}; -} - - ------------------------------------------------------------------------------ --- case of nested classes - -mapping di2::GraphNode::ComponentClass2Class(in node:di2::GraphNode) : notation::Shape { - - type := VisualId_Component_Class; - --seteAnnotation - eAnnotations := setEAnnotations (); - --setchildren - children:=setChildrenForComponentClass(node); - - --set size and width and high - layoutConstraint := object notation::Bounds { - var size : notation::Size := self.size.map dimension2Size(); - var location : notation::Location := self.oclAsType(di2::GraphNode).position.map point2Location(); - x := location.x; - y := location.y; - width := size.width; - height := size.height; - }; - - --set element - element := self.getElement().oclAsType(ecore::EObject); -} - -helper setChildrenForComponentClass(in node:di2::GraphNode) : OrderedSet(notation::Node) -{ - -- - -- - -- - -- - - -- first child - var child1 := object notation::DecorationNode { - type:=VisualId_Component_Class_Label; - --the id is set automatically - }; - - -- second child - var child2 := object notation::BasicCompartment { - type:=VisualId_Component_Class_Compartiment; - - --set children as properties in the case that the nested class contains properties - children:= setPropertiesForState(node.contained); - layoutConstraint:=object notation::Bounds {}; - }; - - return OrderedSet{child1, child2}; -} - - -*/ \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto deleted file mode 100644 index 2ff2ab2c6fb..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/StateDiagVisualIDs.qvto +++ /dev/null @@ -1,84 +0,0 @@ - ---Author Ansgar Radermacher -CEA LIST - -library StateDiagVisualIDs; - ---transition -property VisualId_Edge_Transition : String = "7000"; -property VisualId_Edge_Transition_DecoNode1 : String = "7001"; -property VisualId_Edge_Transition_DecoNode2 : String = "7002"; -property VisualId_Edge_Transition_DecoNode3 : String = "7003"; - ---state machine -property VisualId_StateMachine : String = "2000"; -property VisualId_StateMachine_DecoNode1 : String = "2001"; -property VisualId_StateMachine_DecoNode2 : String = "2002"; - ---region -property VisualId_Region : String = "3000"; -property VisualId_Region_DecoNode : String = "3002"; - ---final state (pseudo state) -property VisualId_FinalState : String = "5000"; -property VisualId_FinalState_DecoNode1 : String = "5001"; -property VisualId_FinalState_DecoNode2 : String = "5002"; - ---state -property VisualId_State : String = "6000"; -property VisualId_State_DecoNode1 : String = "6001"; -property VisualId_State_DecoNode2 : String = "6002"; - ---initial state (pseudo state) -property VisualId_InitialState : String = "8000"; -property VisualId_InitialState_DecoNode1 : String = "8001"; -property VisualId_InitialState_DecoNode2 : String = "8002"; - ---join (pseudo state) -property VisualId_Join : String = "9000"; -property VisualId_Join_DecoNode1 : String = "9001"; -property VisualId_Join_DecoNode2 : String = "9002"; - ---fork (pseudo state) -property VisualId_Fork : String = "10000"; -property VisualId_Fork_DecoNode1 : String = "10001"; -property VisualId_Fork_DecoNode2 : String = "10002"; - ---choice point (pseudo state) -property VisualId_Choice : String = "11000"; -property VisualId_Choice_DecoNode1 : String = "11001"; -property VisualId_Choice_DecoNode2 : String = "11002"; - ---junction (pseudo state) -property VisualId_Junction : String = "12000"; -property VisualId_Junction_DecoNode1 : String = "12001"; -property VisualId_Junction_DecoNode2 : String = "12002"; - ---shallow history state (pseudo state) -property VisualId_ShallowHistoryState : String = "13000"; -property VisualId_ShallowHistoryState_DecoNode1 : String = "13001"; -property VisualId_ShallowHistoryState_DecoNode2 : String = "13002"; - ---deep history state (pseudo state) -property VisualId_DeepHistoryState : String = "14000"; -property VisualId_DeepHistoryState_DecoNode1 : String = "14001"; -property VisualId_DeepHistoryState_DecoNode2 : String = "14002"; - ---termination (pseudo state) -property VisualId_Terminate : String = "15000"; -property VisualId_Terminate_DecoNode1 : String = "15001"; -property VisualId_Terminate_DecoNode2 : String = "15002"; - ---entry point (pseudo state) -property VisualId_EntryPoint : String = "16000"; -property VisualId_EntryPoint_DecoNode1 : String = "16001"; -property VisualId_EntryPoint_DecoNode2 : String = "16002"; - ---exit point (pseudo state) -property VisualId_ExitPoint : String = "17000"; -property VisualId_ExitPoint_DecoNode1 : String = "17001"; -property VisualId_ExitPoint_DecoNode2 : String = "17002"; - ---connection point (pseudo state) -property VisualId_ConnectionPoint : String = "18000"; -property VisualId_ConnectionPoint_DecoNode1 : String = "18001"; -property VisualId_ConnectionPoint_DecoNode2 : String = "18002"; \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto deleted file mode 100644 index 52979027ff7..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/TransfoQvtoDi2toDi/Transfo.qvto +++ /dev/null @@ -1,25 +0,0 @@ - ---Author Manel Fredj-CEA LIST - -import DiTransformations; ---import NotationMappingsandHelpers; -import Diagram; - -modeltype di uses 'http://www.eclipse.org/papyrus/0.7.0/sashdi'; -modeltype di2 uses 'http://www.papyrusuml.org/di2'; -modeltype notation uses 'http://www.eclipse.org/gmf/runtime/1.0.2/notation'; - - - -transformation Transfo(in src : di2, out target1 : notation, out target2:di); - -main() { - src.rootObjects()->forEach (e|e.oclIsTypeOf(di2::Diagram)) { - e.oclAsType(di2::Diagram).map diagram2diagram(); - }; - - src.rootObjects()![di2::Diagram]->map diagram2SashWindowsMngr(); -} - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/build.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/build.properties deleted file mode 100644 index 4cc050a6e8a..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - TransfoQvtoDi2toDi/ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html deleted file mode 100644 index 140e077f5c9..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/TutorialConversion.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -

    -Tutorial

    -

    Converter: Diagram Conversion

    -

    From Papyrus 1 to Papyrus MDT

    -

    -

    Specificities

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Plugin name

    org.eclipse.papyrus.conversion.di2todi

    Papyrus version

    To be used with Papyrus MDT

    Status

    In progress

    (class, composite structure, profile and state diagrams are supported)

    Institution

    CEA LIST

    Authors

    Manel Fredj (initial development), Ansgar Radermacher (clean-up/extensions)

    Required (Papyrus) plugins

    • org.eclipse.papyrus.conversion.di2

    Other Dependencies

      -
    • org.eclipse.m2m.qvt.oml => Install QVT -
    • org.eclipse.ui -
    • org.eclipse.core.runtime -
    • org.eclipse.core.resources -
    • org.eclipse.uml2.uml -
    • org.eclipse.gmf.runtime.notation -
    • org.eclipse.m2m.qvt.oml.emf.util -

    Extensions

      -
    • org.eclipse.m2m.qvt.oml.javaBlackboxUnits -
    • org.eclipse.ui.popupMenus -
    - -

    - -

    User Guide

    - -This plugin enables to convert diagrams created using papyrus 1.X version -into diagram editable by Papyrus MDT. This Tutorial is twofold: - -
      -
    • First, it includes a user guide in order to convert your diagrams (created - with Papyrus 1.X) into diagrams editable by Papyrus MDT - -
    • Second, it includes a developer guide in order to help developers to extend the - conversion to other diagram not already supported. -
    - -

    - -

    How to use the converter?

    - -
      -
    • Add the org.eclipse.papyrus.conversion.di2 + di2todi plugins to your - eclipse configuration. These plugins are provided in the Papyrus SVN - repository under extraplugins/conversion. - -
    • Launch eclipse, including Papyrus MDT. Import your old-version model - created with Papyrus 1.x, let’s call it “Example”. To this aim - you need to import two files: “Example.di2” and “Example.uml”, - as shown in Figure 2. - -
    - -
    -
    - Import Papyrus 1.x Model -
    - -
      -
    • Convert your model. To this aim: - Right click on “Example.di2”> in the menu, select “Convert - Diagram”>then, “Di2 to Di Action”, as shown in Figure 3. -
    - -
    -
    - Convert Your Model -
    - -
      -
    • After processing, a new model is created, compatible with Papyrus MDT. - Indeed, the conversion creates from the di2 file (i.e., Example.di2) - two new files, namely, “Example.notation” and “Example.di”. - The uml file (i.e., Example.uml) is used to make reference to the - uml graphical elements. At the end of the conversion a message - dialog is opened to inform you of the success or the failure of your - conversion. -
    - -
    -
    - Conversion result -
    - -
      -
    • Open the generated di file (i.e., Example.di) to show and edit your - model. -
    - -

    Internal Process of the conversion

    - -This process is performed transparently to user, however, this brief description aims -to provide global overview of the internal process - -

    1st Step

    -As mentioned in the step2, the diagram -converter requires the di2 namespace to be uniquely defined. To this -aim as a first step of the internal process, the converter changed -the namespace in the di2 file from “http://www.papyrusuml.org” to -“http://www.papyrusuml.org/di2”. - - -This step is meant to be transparent to the user, as the converter -restores the di2 namespace to “http://www.papyrusuml.org” -at the end of the conversion, in order to make your diagram editable -by Papyrus 1.x. However, -if the conversion fails before restoring the original name space, the -old-version model may be no more editable by Papyrus 1.x. Hence, the -user may need to restore it manually by editing the di2 file using a -text editor, and removing the “/di2” from the namespace -http://www.papyrusuml.org/di2. - -

    2nd Step

    - -As a second step, the converter transforms elements described in the di2 -file into elements in the notation and di files according to their -respective metamodels. - -The di file contains references to the different diagrams in your model. -The notation file contains a specific description of the elements -that are represented graphically in each diagram: size, coordinates, -nested elements, and so on. -To perform this step, the converter performed a set of QVT -(Query/View/Transform) Operation mappings. - -

    3rd Step

    - -Finally, the converter stores the result of the transformation in to two files, -namely, notation and di file, and restores the di2 namespace to -“http://www.papyrusuml.org”. - -

    Supported Conversions

    - -Herein, we present two sample conversions and outline the elements supported by the converter. We start -first with the class diagram and then, we detail the transformations in the composite diagram. - -

    Class Diagram

    - -Tests have been done with class diagrams containing -
      -
    • Simple classes -
    • Class with operations and attributes -
    • Comments -
    • Relationships between classes -
        -
      • Dependency -
      • Association -
      • Link with a comment -
      • Realization -
      • Generalization -
      -
    - -The screenshots have been taken with an older version that did not copy color attributes. These are now handled. - -
    -
    - Class diagram in Papyrus 1.12 (original) -

    -
    - Class diagram in Papyrus MDT (conversion result) -

    - -

    Composite Diagram

    - -Tests have been done with composite diagrams containing - -
      -
    • Composite classes -
    • Properties within composite classes -
    • Nested classes -
    • Ports -
    • Connection between ports: connector -
    - -
    -
    - Composite diagram in Papyrus 1.12 (original) -

    -
    - Composite diagram in Papyrus MDT (conversion result) -

    - -

    Developer guide

    - -To convert models from Papyrus 1.x to Papyrus MDT, this plugin uses Q/V/T operational mappings. -The plugin contains additional Java code, it is divided into three parts: -
      -
    • Model Transformation libraries implemented in QVTO -
    • Black Boxes implemented in Java and used by the model transformations -
    • Java code that is used to call the model transformations and extend the eclipse - context menu with the conversion action, i.e., "Convert Diagram". -
    - -The main part of the plugin is the model transformation, which includes -
      -
    • General libraries: -
        -
      • ElementType.qvto: names of diagrams in Papyrus 1.12 and MDT. -
      • GeneralMappingsandHelpers.qvto: collection of utilities -
      • NotationQueries.qvto - includes all the queries that are made to the di2 model in order to - be used in the notation model. -
      • Diagram.qvto: convert the supported diagrams, make use of diagram specific - libraries below. -
      • DiTansformation.qvto - enable to create the elements of the di model from the di2 model. -
      - -
    • Diagram specific libraries, prefixed with name of diagram, i.e. <Class>, <Composite>, <State>, - <Profile> and <ClassAndProfile> (the letter is a particular case for edges in class and profile - diagrams which have identical IDs in these two diagram types) -
        -
      • DiagEdge.qvto - that converts all sorts of edges (realization, dependency, - generalization, and so on). -
      • DiagNodes.qvto that converts the node elements of a diagram -
      -
    • The main transformation -
        -
      • Transfo.qvto, which triggers the model transformation. -
      -
    diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png deleted file mode 100644 index 1e1d021cd66..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-di2action.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png deleted file mode 100644 index 5c11cc12e2e..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-project.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png deleted file mode 100644 index fe3a0e97514..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/conversion-example-result.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png deleted file mode 100644 index ae6b496d0c8..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-mdt.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png deleted file mode 100644 index 0a61e8d5ae5..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example-composite-diag-p1.12.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png deleted file mode 100644 index 531381a328e..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-mdt.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png deleted file mode 100644 index 726a5582f1b..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example1-class-diagram-p1.12.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png deleted file mode 100644 index c8112529635..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-mdt.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png deleted file mode 100644 index 8a9e3e5e824..00000000000 Binary files a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/doc/figs/example2-class-diagram-p1.12.png and /dev/null differ diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.properties b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.properties deleted file mode 100644 index 1803ba8aee5..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.properties +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################# -# Copyright (c) 2011 CEA LIST. -# 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Manel Fredj, Ansgar Radermacher - Initial API and implementation -################################################################################## -pluginName=di2 to di conversion (Papyrus 1.x to Papyrus MDT) -providerName=Eclipse Modeling Project diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.xml b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.xml deleted file mode 100644 index 484692c3519..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/plugin.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java deleted file mode 100644 index c660b3cea70..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/Activator.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.eclipse.papyrus.conversion.di2todi; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.conversion.di2todi"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java deleted file mode 100644 index 9138b043865..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/blackboxes/UtilitiesLibrary.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * @author: Manel Fredj - CEA - * This class includes all the operations that are called in the transformation QVTO from java. - * These operations are wrapped into a black-box - */ - -package org.eclipse.papyrus.conversion.di2todi.blackboxes; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.NotationFactory; -import org.eclipse.gmf.runtime.notation.RelativeBendpoints; -import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; -import org.eclipse.m2m.qvt.oml.blackbox.java.Operation; -import org.eclipse.papyrus.conversion.di2.GraphElement; -import org.eclipse.papyrus.conversion.di2.SemanticModelBridge; -import org.eclipse.papyrus.conversion.di2.Uml1SemanticModelBridge; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.uml2.uml.Association; -import org.eclipse.uml2.uml.Dependency; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.ElementImport; -import org.eclipse.uml2.uml.Generalization; -import org.eclipse.uml2.uml.Realization; - -public class UtilitiesLibrary { - - @Operation(contextual=true) - public static String getName(Diagram self) - { - return self.getName(); - } - - @Operation(contextual=true) - public static EObject convertElement(Element self) - { - return self; - } - - @Operation(contextual=true) - public static String getElementType(Element self) - { - if (self instanceof Association ) - return "Association"; - if (self instanceof Generalization ) - return "Generalization"; - else return null; - } - - @Operation(contextual=true) - public static boolean isGeneralization(Element self) - { - if (self instanceof Generalization) - return true; - else return false; - } - - - @Operation(contextual=true) - public static boolean isAssociation(Element self) - { - if (self instanceof Association) - return true; - else - return false; - } - - @Operation(contextual=true) - public static boolean isRealization(Element self) - { - if (self instanceof Realization) - return true; - else - return false; - } - @Operation(contextual=true) - public static boolean isDependency(Element self) - { - if (self instanceof Dependency) - return true; - else - return false; - } - - @Operation(contextual=true) - public static int dimensionGetWidth(Dimension self) - { - if (self!=null) - return self.width; - else - return 0; - } - - @Operation(contextual=true) - public static int dimensionGetHeight(Dimension self) - { - if (self!=null) - return self.height; - else - return 0; - } - - @Operation(contextual=true) - public static int pointGetX(Point self) - { - if (self!=null) - { - - return self.x; - }else - return 0; - } - - @Operation(contextual=true) - public static int pointGetY(Point self) - { - if (self!=null) - { - return self.y; - } - else - return 0; - } - - @Operation(contextual=true) - public static String showcoordinates(Point self) - { - if (self!=null) - { - return "the x is "+ self.x+ "and the y is "+ self.y; - } - else - return "nothing to display"; - } - - @Operation(contextual=true) - public static int rgb2int(RGB self) - { - if (self!=null) - return self.blue * 0x10000 + self.green *0x100 + self.red; - else - return 0; - } - - @Operation(contextual=true) - public static Element getElement(Uml1SemanticModelBridge bridge) { - // difference to using element attribute directly: getElement will try to resolve proxies - // and thus detects elements referenced by the di2 model that do not exist (anymore) in the - // uml model - Element element = bridge.getElement(); - if ((element != null) && element.eIsProxy()) { - // is still proxy (the getElement implementation of Uml1SemanticModelBridge already tried to - // resolve) => return null - return null; - } - else { - return element; - } - } - - /** - * Return the semantic model for a given di2 element - * @param di2Element existing di2 element - * @return the associated semantic model or null - */ - @Operation(contextual=true) - public static Uml1SemanticModelBridge getSemanticModel(GraphElement di2Element) { - SemanticModelBridge semanticModel; - if (di2Element instanceof org.eclipse.papyrus.conversion.di2.Diagram) { - semanticModel =((org.eclipse.papyrus.conversion.di2.Diagram) di2Element).getOwner(); - } - else { - semanticModel = di2Element.getSemanticModel(); - } - if (semanticModel instanceof Uml1SemanticModelBridge) { - return (Uml1SemanticModelBridge) semanticModel; - } - return null; - } - - @Operation(contextual=true) - public static Element getElement(GraphElement di2Element) { - - Uml1SemanticModelBridge semanticModel = getSemanticModel(di2Element); - if (semanticModel != null) { - return getElement (semanticModel); - } - else { - System.err.println("no bridge found for di2Node" + di2Element); - } - return null; - } - - // may be useful for debugging (use it instead of getElement in combination with a breakpoint) - @Operation(contextual=true) - public static Element getElementDebug(GraphElement di2Element) { - - Element element = getElement(di2Element); - return element; - } - - /** - * Papyrus 1 profile diagrams do not reference meta-class elements directly, but the - * associated element imported - * @param bridge - * @return - */ - @Operation(contextual=true) - public static Element getMetaclassRef(Uml1SemanticModelBridge semanticModel) { - Element element = getElement (semanticModel); - if (element != null) { - if (element instanceof ElementImport) { - return ((ElementImport) element).getImportedElement(); - } - } - else { - System.err.println("no element found"); - } - return element; - } - - public Object createBendpoints() - { - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints(); - List points = new ArrayList(2); - points.add(new RelativeBendpoint(0,0,0,0)); - points.add(new RelativeBendpoint(0,0,0,0)); - bendpoints.setPoints(points); - return bendpoints; - } -} \ No newline at end of file diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java deleted file mode 100644 index 2c0729cdeda..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/Di2toDiAction.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * @author: Manel Fredj - CEA - * This class invoke QVTO transformations that convert a diagram from di2 into di+notation - */ - -package org.eclipse.papyrus.conversion.di2todi.popupactions; - -import java.io.File; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.resource.URIConverter; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.m2m.internal.qvt.oml.ast.env.ModelExtentContents; -import org.eclipse.m2m.internal.qvt.oml.common.MdaException; -import org.eclipse.m2m.internal.qvt.oml.emf.util.ModelContent; -import org.eclipse.m2m.internal.qvt.oml.library.Context; -import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner; -import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner.In; -import org.eclipse.m2m.internal.qvt.oml.runtime.generator.TransformationRunner.Out; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation; -import org.eclipse.m2m.internal.qvt.oml.runtime.project.TransformationUtil; -import org.eclipse.m2m.internal.qvt.oml.trace.Trace; -import org.eclipse.m2m.internal.qvt.oml.trace.TraceRecord; -import org.eclipse.m2m.qvt.oml.util.IContext; -import org.eclipse.papyrus.conversion.di2.util.Di2AdapterFactory; -import org.eclipse.papyrus.conversion.di2todi.Activator; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IActionDelegate; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; - - -@SuppressWarnings("restriction") -public class Di2toDiAction implements IObjectActionDelegate { - - private static final Map options = null; - private IPath inModelPath; //reference to selected Model - private String inAbsolutepath; - - /** - * Constructor for Action1. - */ - public Di2toDiAction() { - super(); - inModelPath=null; - inAbsolutepath=null; - } - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - } - - /** - * @see IActionDelegate#run(IAction) - */ - public void run(IAction action) { - if (adapterFactory == null) { - // dummy operation to force loading/initialization of di2 plugin - adapterFactory = new Di2AdapterFactory(); - } - // Refer to an existing transformation via URI - final URI transformationURI = - URI.createURI("platform:/plugin/" + Activator.PLUGIN_ID + "/TransfoQvtoDi2toDi/Transfo.qvto"); - - //get the resources from the input URI - final ResourceSet resourceSet = new ResourceSetImpl(); - Job job = new Job("Convert diagram " + inModelPath.toString()) { - @Override - protected IStatus run(IProgressMonitor monitor) { - // execute the task ... - - try { - monitor.beginTask("converting ...", 4); - - URI inURI = URI.createPlatformResourceURI(inModelPath.toString(), true); - Resource inResource = resourceSet.getResource(inURI, true); - // create the inputs - List inObjects =inResource.getContents(); - ModelContent input_di2 = new ModelContent (inObjects); - ModelContent[] inputs = new ModelContent[1]; - inputs[0]=input_di2; - - // setup the execution environment details -> context - IContext mycontext = new Context(); - Trace trace= null; - - QvtInterpretedTransformation transformation = new QvtInterpretedTransformation (TransformationUtil.getQvtModule(transformationURI)); - In IntransformationRunner=new TransformationRunner.In(inputs, mycontext); - Out OuttransformationRunner=new TransformationRunner.Out(null,null, null); - - monitor.worked(1); - // running the transformation - OuttransformationRunner=transformation.run(IntransformationRunner); - - // retrieve the outputs - List outputs= OuttransformationRunner.getExtents(); - - // retrieve the trace - trace= OuttransformationRunner.getTrace(); - - if (trace !=null && outputs.size()==2) { - // processing the trace - URI Uri_trace = inURI.trimFileExtension().appendFileExtension("trace"); - EList outObjects_trace = trace.getTraceRecords(); - Resource outResource_trace = resourceSet.createResource(Uri_trace); - outResource_trace.getContents().addAll(outObjects_trace); - - // processing the outputs - ModelExtentContents output_notation = outputs.get(0); - ModelExtentContents output_di = outputs.get(1); - monitor.worked(1); - - URI Uri_notation = inURI.trimFileExtension().appendFileExtension("notation"); - URI Uri_di = inURI.trimFileExtension().appendFileExtension("di"); - - // the output objects got captured in the output extent - List outObjects_notation = output_notation.getAllRootElements(); - List outObjects_di = output_di.getAllRootElements(); - - //Let's persist them using a resource for notation - Resource outResource_notation = resourceSet.createResource(Uri_notation ); - outResource_notation.getContents().addAll(outObjects_notation); - - // let's persist them using a resource for di - Resource outResource_di = resourceSet.createResource(Uri_di); - outResource_di.getContents().addAll(outObjects_di); - - monitor.worked(1); - - try{ - outResource_notation.save(Collections.emptyMap()); - outResource_di.save(Collections.emptyMap()); - outResource_trace.save(Collections.emptyMap()); - } - catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - monitor.worked(1); - - // remove trace file - URIConverter uri= resourceSet.getURIConverter(); - uri.delete(Uri_trace, options); - } - } - catch (final MdaException e) { - Display.getDefault().syncExec(new Runnable() { - public void run() { - MessageDialog.openError( - new Shell(), "Model transformation error during conversion", e.toString ()); - } - }); - e.printStackTrace(); - } - catch (final IOException e) { - Display.getDefault().syncExec(new Runnable() { - public void run() { - MessageDialog.openError( - new Shell(), "IO error during conversion", e.toString ()); - } - }); - e.printStackTrace(); - } - catch (final RuntimeException e) { - Display.getDefault().syncExec(new Runnable() { - public void run() { - MessageDialog.openError( - new Shell(), "Error during conversion", e.toString ()); - } - }); - e.printStackTrace (); - } - finally { - // when the transformation succeeds - //1- restore the content of Di2 file i.e., di2 namespace - PapyrusNamespace.restoreDi2Namespace(inAbsolutepath); - } - - monitor.done(); - return Status.OK_STATUS; - } - }; - job.setUser (true); - job.schedule (); - } - - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) - { - this.inModelPath = null; - - if (!(selection instanceof IStructuredSelection)) { - // no structured-selection - return; - } - IStructuredSelection structuredSelection = (IStructuredSelection) selection; - if (selection.isEmpty()) { - return; - } - - Object firstElement = structuredSelection.getFirstElement(); - - if (firstElement instanceof IFile) { - - IFile di2Select = (IFile) firstElement; - // retrieve the path of the file - IPath di2Path = di2Select.getFullPath(); - IPath location = di2Select.getLocation(); - if (location != null) { - // Get the file for the location - File file = location.toFile(); - if (file != null) { - // Add the absolute path to the list - this.inAbsolutepath = file.getAbsolutePath(); - } - - // check whether it is a .di2 file - String di2filename = di2Path.toString(); - if (di2filename.endsWith (".di2")) { - // change namespace of di2 - PapyrusNamespace.replaceNamespace(this.inAbsolutepath); - this.inModelPath = di2Path; - } - } - } - } - - Di2AdapterFactory adapterFactory = null; -} - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java deleted file mode 100644 index 5a17df64ff2..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/src/org/eclipse/papyrus/conversion/di2todi/popupactions/PapyrusNamespace.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author: Manel Fredj - CEA - * This class enables to change the namespace of di2 metamodel from - * replace http://www.papyrusuml.org into http://www.papyrusuml.org/di2 - */ - -package org.eclipse.papyrus.conversion.di2todi.popupactions; - -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileWriter; -import java.io.IOException; - -public class PapyrusNamespace -{ - ///////////////////////////////////////////////////////////////////////////////////////////// - //replace http://www.papyrusuml.org -- by -- http://www.papyrusuml.org/di2 - - public static void replaceNamespace(String absolutepath) - { - try { - String oldNameSpace = "di2=\"http://www.papyrusuml.org\""; - String newNameSpace="di2=\"http://www.papyrusuml.org/di2\""; - String oldtext =readFileAsString(absolutepath); - // replace the namespace in the di2 file - String newtext = oldtext.replaceAll (oldNameSpace, newNameSpace); - - FileWriter writer = new FileWriter(absolutepath); - writer.write(newtext);writer.close(); - } - catch (IOException ioe) { - ioe.printStackTrace(); - } - } - - public static void restoreDi2Namespace(String absolutepath) - { - try { - String oldNameSpace="di2=\"http://www.papyrusuml.org/di2\""; - String newNameSpace = "di2=\"http://www.papyrusuml.org\""; - - String oldtext =readFileAsString(absolutepath); - // replace the namespace in the di2 file - String newtext = oldtext.replaceAll (oldNameSpace, newNameSpace); - - FileWriter writer = new FileWriter(absolutepath); - writer.write(newtext);writer.close(); - } - catch (IOException ioe) { - ioe.printStackTrace(); - } - } - - /** - * @param filePath the name of the file to open. Not sure if it can accept - * cccURLs or just filenames. Path handling could be better, and buffer - * sizes are hardcoded - */ - private static String readFileAsString (String filePath) - throws java.io.IOException - { - byte[] buffer = new byte[(int) new File(filePath).length()]; - BufferedInputStream f = null; - try { - f = new BufferedInputStream(new FileInputStream(filePath)); - f.read(buffer); - } - finally { - if (f != null) { - try { - f.close(); - } - catch (IOException ignored) { - } - } - } - return new String(buffer); - } -} diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/toc.xml b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/toc.xml deleted file mode 100644 index 3057fc280ee..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/toc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/tocdev.xml b/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/tocdev.xml deleted file mode 100644 index 53009154565..00000000000 --- a/extraplugins/conversion/org.eclipse.papyrus.conversion.di2todi/tocdev.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - -- cgit v1.2.3 From 037964361184151633bde6cc05d6ad1cab3e7253 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:31:58 +0100 Subject: [Releng] Move the oep.conversion plug-ins to the deprecated folder --- .../.project | 17 ++ .../build.properties | 7 + .../eclipse_papyrus_helios.xml | 94 ++++++++ .../epl-v10.html | 261 +++++++++++++++++++++ .../epp.product | 56 +++++ .../feature.properties | 130 ++++++++++ .../feature.xml | 65 +++++ .../license.html | 107 +++++++++ .../org.eclipse.epp.package.papyrus.feature/p2.inf | 8 + .../plugin_customization.ini | 1 + .../org.eclipse.epp.package.papyrus/.project | 22 ++ .../META-INF/MANIFEST.MF | 9 + .../org.eclipse.epp.package.papyrus/about.html | 28 +++ .../org.eclipse.epp.package.papyrus/about.ini | 37 +++ .../org.eclipse.epp.package.papyrus/about.mappings | 6 + .../about.properties | 28 +++ .../buckminster.cspex | 41 ++++ .../build.properties | 15 ++ .../org.eclipse.epp.package.papyrus/eclipse.gif | Bin 0 -> 1052 bytes .../org.eclipse.epp.package.papyrus/eclipse.png | Bin 0 -> 654 bytes .../org.eclipse.epp.package.papyrus/eclipse32.gif | Bin 0 -> 1706 bytes .../org.eclipse.epp.package.papyrus/eclipse32.png | Bin 0 -> 4594 bytes .../org.eclipse.epp.package.papyrus/eclipse48.gif | Bin 0 -> 2371 bytes .../org.eclipse.epp.package.papyrus/eclipse48.png | Bin 0 -> 3099 bytes .../org.eclipse.epp.package.papyrus/eclipse_lg.gif | Bin 0 -> 12710 bytes .../intro-eclipse.png | Bin 0 -> 13739 bytes .../org.eclipse.epp.package.papyrus/plugin.xml | 51 ++++ .../plugin_customization.ini | 37 +++ .../.project | 17 -- .../build.properties | 7 - .../eclipse_papyrus_helios.xml | 94 -------- .../epl-v10.html | 261 --------------------- .../epp.product | 56 ----- .../feature.properties | 130 ---------- .../feature.xml | 65 ----- .../license.html | 107 --------- .../org.eclipse.epp.package.papyrus.feature/p2.inf | 8 - .../plugin_customization.ini | 1 - .../rcp/org.eclipse.epp.package.papyrus/.project | 22 -- .../META-INF/MANIFEST.MF | 9 - .../rcp/org.eclipse.epp.package.papyrus/about.html | 28 --- .../rcp/org.eclipse.epp.package.papyrus/about.ini | 37 --- .../org.eclipse.epp.package.papyrus/about.mappings | 6 - .../about.properties | 28 --- .../buckminster.cspex | 41 ---- .../build.properties | 15 -- .../org.eclipse.epp.package.papyrus/eclipse.gif | Bin 1052 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse.png | Bin 654 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse32.gif | Bin 1706 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse32.png | Bin 4594 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse48.gif | Bin 2371 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse48.png | Bin 3099 -> 0 bytes .../org.eclipse.epp.package.papyrus/eclipse_lg.gif | Bin 12710 -> 0 bytes .../intro-eclipse.png | Bin 13739 -> 0 bytes .../rcp/org.eclipse.epp.package.papyrus/plugin.xml | 51 ---- .../plugin_customization.ini | 37 --- 56 files changed, 1020 insertions(+), 1020 deletions(-) create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/.project create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/build.properties create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/epl-v10.html create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/epp.product create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/feature.properties create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/feature.xml create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/license.html create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/p2.inf create mode 100644 deprecated/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini create mode 100644 deprecated/org.eclipse.epp.package.papyrus/.project create mode 100644 deprecated/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.epp.package.papyrus/about.html create mode 100644 deprecated/org.eclipse.epp.package.papyrus/about.ini create mode 100644 deprecated/org.eclipse.epp.package.papyrus/about.mappings create mode 100644 deprecated/org.eclipse.epp.package.papyrus/about.properties create mode 100644 deprecated/org.eclipse.epp.package.papyrus/buckminster.cspex create mode 100644 deprecated/org.eclipse.epp.package.papyrus/build.properties create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse.gif create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse.png create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse32.gif create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse32.png create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse48.gif create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse48.png create mode 100644 deprecated/org.eclipse.epp.package.papyrus/eclipse_lg.gif create mode 100644 deprecated/org.eclipse.epp.package.papyrus/intro-eclipse.png create mode 100644 deprecated/org.eclipse.epp.package.papyrus/plugin.xml create mode 100644 deprecated/org.eclipse.epp.package.papyrus/plugin_customization.ini delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/.project delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/build.properties delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epl-v10.html delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epp.product delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.properties delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.xml delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/license.html delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/p2.inf delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/.project delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/about.html delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/about.ini delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/about.mappings delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/about.properties delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/buckminster.cspex delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/build.properties delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.gif delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.png delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.gif delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.png delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.gif delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.png delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse_lg.gif delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/intro-eclipse.png delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin.xml delete mode 100644 extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin_customization.ini (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/.project b/deprecated/org.eclipse.epp.package.papyrus.feature/.project new file mode 100644 index 00000000000..5c7c9b3f00a --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/.project @@ -0,0 +1,17 @@ + + + org.eclipse.epp.package.papyrus.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/build.properties b/deprecated/org.eclipse.epp.package.papyrus.feature/build.properties new file mode 100644 index 00000000000..7d2d8724f28 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/build.properties @@ -0,0 +1,7 @@ +bin.includes = feature.xml,\ + p2.inf,\ + epl-v10.html,\ + license.html,\ + feature.properties,\ + plugin_customization.ini +includeLaunchers = false diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml b/deprecated/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml new file mode 100644 index 00000000000..370e83fbfb4 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml @@ -0,0 +1,94 @@ + + + + + + + incubating components, as indicated by feature numbers less than 1.0.0 on the feature list.]]> + + + Cédric Brun + Markus Knauer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/epl-v10.html b/deprecated/org.eclipse.epp.package.papyrus.feature/epl-v10.html new file mode 100644 index 00000000000..2e85bcbd1ac --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/epl-v10.html @@ -0,0 +1,261 @@ + + + + + + +Eclipse Public License - Version 1.0 + + + + + + +

    Eclipse Public License - v 1.0

    + +

    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR +DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS +AGREEMENT.

    + +

    1. DEFINITIONS

    + +

    "Contribution" means:

    + +

    a) in the case of the initial Contributor, the initial +code and documentation distributed under this Agreement, and

    +

    b) in the case of each subsequent Contributor:

    +

    i) changes to the Program, and

    +

    ii) additions to the Program;

    +

    where such changes and/or additions to the Program +originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) +are not derivative works of the Program.

    + +

    "Contributor" means any person or entity that distributes +the Program.

    + +

    "Licensed Patents" mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program.

    + +

    "Program" means the Contributions distributed in accordance +with this Agreement.

    + +

    "Recipient" means anyone who receives the Program under +this Agreement, including all Contributors.

    + +

    2. GRANT OF RIGHTS

    + +

    a) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works +of, publicly display, publicly perform, distribute and sublicense the +Contribution of such Contributor, if any, and such derivative works, in +source code and object code form.

    + +

    b) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, +offer to sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder.

    + +

    c) Recipient understands that although each Contributor +grants the licenses to its Contributions set forth herein, no assurances +are provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program.

    + +

    d) Each Contributor represents that to its knowledge it +has sufficient copyright rights in its Contribution, if any, to grant +the copyright license set forth in this Agreement.

    + +

    3. REQUIREMENTS

    + +

    A Contributor may choose to distribute the Program in object code +form under its own license agreement, provided that:

    + +

    a) it complies with the terms and conditions of this +Agreement; and

    + +

    b) its license agreement:

    + +

    i) effectively disclaims on behalf of all Contributors +all warranties and conditions, express and implied, including warranties +or conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose;

    + +

    ii) effectively excludes on behalf of all Contributors +all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits;

    + +

    iii) states that any provisions which differ from this +Agreement are offered by that Contributor alone and not by any other +party; and

    + +

    iv) states that source code for the Program is available +from such Contributor, and informs licensees how to obtain it in a +reasonable manner on or through a medium customarily used for software +exchange.

    + +

    When the Program is made available in source code form:

    + +

    a) it must be made available under this Agreement; and

    + +

    b) a copy of this Agreement must be included with each +copy of the Program.

    + +

    Contributors may not remove or alter any copyright notices contained +within the Program.

    + +

    Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution.

    + +

    4. COMMERCIAL DISTRIBUTION

    + +

    Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use of +the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create +potential liability for other Contributors. Therefore, if a Contributor +includes the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") +arising from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In +order to qualify, an Indemnified Contributor must: a) promptly notify +the Commercial Contributor in writing of such claim, and b) allow the +Commercial Contributor to control, and cooperate with the Commercial +Contributor in, the defense and any related settlement negotiations. The +Indemnified Contributor may participate in any such claim at its own +expense.

    + +

    For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages.

    + +

    5. NO WARRANTY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, +ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable laws, +damage to or loss of data, programs or equipment, and unavailability or +interruption of operations.

    + +

    6. DISCLAIMER OF LIABILITY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    + +

    7. GENERAL

    + +

    If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable.

    + +

    If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed.

    + +

    All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of time +after becoming aware of such noncompliance. If all Recipient's rights +under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.

    + +

    Everyone is permitted to copy and distribute copies of this +Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The +Agreement Steward reserves the right to publish new versions (including +revisions) of this Agreement from time to time. No one other than the +Agreement Steward has the right to modify this Agreement. The Eclipse +Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a +suitable separate entity. Each new version of the Agreement will be +given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives no +rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved.

    + +

    This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No party +to this Agreement will bring a legal action under this Agreement more +than one year after the cause of action arose. Each party waives its +rights to a jury trial in any resulting litigation.

    + + + + \ No newline at end of file diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/epp.product b/deprecated/org.eclipse.epp.package.papyrus.feature/epp.product new file mode 100644 index 00000000000..d88a8200ff1 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/epp.product @@ -0,0 +1,56 @@ + + + + + + + + Specified in the plugin.xml of the branding plugin. + + + + + + + + -product org.eclipse.epp.package.papyrus.product +--launcher.defaultAction openFile + --launcher.XXMaxPermSize +256M + -Dosgi.requiredJavaVersion=1.5 +-Xms40m +-Xmx512m + -XX:MaxPermSize=256m + -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts +-XX:MaxPermSize=256m + + + + + + + + + + + + + + + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/feature.properties b/deprecated/org.eclipse.epp.package.papyrus.feature/feature.properties new file mode 100644 index 00000000000..9c9df421fba --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/feature.properties @@ -0,0 +1,130 @@ +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html + +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +April 14, 2010\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the\n\ +Eclipse Foundation is provided to you under the terms and conditions of\n\ +the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ +provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse Foundation source code\n\ +repository ("Repository") in software modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ +Update License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties" found within a Feature.\n\ +Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ +terms and conditions (or references to such terms and conditions) that\n\ +govern your use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +\n\Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which include,\n\ +but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ +the purpose of allowing users to install software, documentation, information and/or\n\ +other materials (collectively "Installable Software"). This capability is provided with\n\ +the intent of allowing such users to install, extend and update Eclipse-based products.\n\ +Information about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install Installable Software.\n\ +You shall be responsible for enabling the applicable license agreements relating to the\n\ +Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ +in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ +making it available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the following:\n\ +\n\ + 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ + the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ + extending or updating the functionality of an Eclipse-based product.\n\ + 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ + Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ + 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ + govern the use of the Installable Software ("Installable Software Agreement") and such\n\ + Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ + with the Specification. Such Installable Software Agreement must inform the user of the\n\ + terms and conditions that govern the Installable Software and must solicit acceptance by\n\ + the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ + indication of agreement by the user, the provisioning Technology will complete installation\n\ + of the Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use, and\n\ +re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/feature.xml b/deprecated/org.eclipse.epp.package.papyrus.feature/feature.xml new file mode 100644 index 00000000000..9c267c277eb --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/feature.xml @@ -0,0 +1,65 @@ + + + + + This modeling package contains a collection of Eclipse Modeling Project components, including EMF, GMF, MDT XSD/OCL/UML2, M2M, M2T, and EMFT elements. It includes a complete SDK, developer tools and source code. Note that the Modeling package includes some incubating components, as indicated by feature numbers less than 1.0.0 on the feature list. + + + + %license + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/license.html b/deprecated/org.eclipse.epp.package.papyrus.feature/license.html new file mode 100644 index 00000000000..69305408635 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/license.html @@ -0,0 +1,107 @@ + + + + + +Eclipse Foundation Software User Agreement + + + +

    Eclipse Foundation Software User Agreement

    +

    April 14, 2010

    + +

    Usage Of Content

    + +

    THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

    + +

    Applicable Licenses

    + +

    Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

    + +

    Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code + repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

    + +
      +
    • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
    • +
    • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
    • +
    • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
    • +
    • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
    • +
    + +

    The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

    + +
      +
    • The top-level (root) directory
    • +
    • Plug-in and Fragment directories
    • +
    • Inside Plug-ins and Fragments packaged as JARs
    • +
    • Sub-directories of the directory named "src" of certain Plug-ins
    • +
    • Feature directories
    • +
    + +

    Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

    + +

    THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

    + + + +

    IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

    + + +

    Use of Provisioning Technology

    + +

    The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse + Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html + ("Specification").

    + +

    You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the + applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology + in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the + Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

    + +
      +
    1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology + on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based + product.
    2. +
    3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.
    4. +
    5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern + the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such + indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
    6. +
    + +

    Cryptography

    + +

    Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

    + +

    Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

    + + diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/p2.inf b/deprecated/org.eclipse.epp.package.papyrus.feature/p2.inf new file mode 100644 index 00000000000..47b3c3edda8 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/p2.inf @@ -0,0 +1,8 @@ +#tell pde.build not to generate start levels +org.eclipse.pde.build.append.startlevels=false + +#add requirement on org.eclipse.platform.ide +requires.1.namespace=org.eclipse.equinox.p2.iu +requires.1.name=org.eclipse.platform.ide +#requires.1.range=[3.5.0.I20090522-1710,3.5.0.I20090522-1710] +requires.1.greedy=true diff --git a/deprecated/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini b/deprecated/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini new file mode 100644 index 00000000000..ecdf68e87a3 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini @@ -0,0 +1 @@ +org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true diff --git a/deprecated/org.eclipse.epp.package.papyrus/.project b/deprecated/org.eclipse.epp.package.papyrus/.project new file mode 100644 index 00000000000..232ced80263 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/.project @@ -0,0 +1,22 @@ + + + org.eclipse.epp.package.papyrus + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/deprecated/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF b/deprecated/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..2931b10f086 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: EPP Papyrus Bundle +Bundle-SymbolicName: org.eclipse.epp.package.papyrus;singleton:=true +Bundle-Version: 0.7.1.qualifier +Bundle-Vendor: Eclipse.org - EPP +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Require-Bundle: org.eclipse.platform, + org.eclipse.equinox.app diff --git a/deprecated/org.eclipse.epp.package.papyrus/about.html b/deprecated/org.eclipse.epp.package.papyrus/about.html new file mode 100644 index 00000000000..97ad4ef97ce --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

    About This Content

    + +

    June, 2010

    +

    License

    + +

    The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

    + +

    If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

    + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus/about.ini b/deprecated/org.eclipse.epp.package.papyrus/about.ini new file mode 100644 index 00000000000..408d6f3f39f --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/about.ini @@ -0,0 +1,37 @@ +# about.ini +# contains information about a feature +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in about.properties +# This file does not need to be translated. + +# Property "aboutText" contains blurb for feature details in the "About" +# dialog (translated). Maximum 15 lines and 75 characters per line. +aboutText=%blurb + +# Property "featureImage" contains path to feature image (32x32) +featureImage=eclipse32.png + +# Property "windowImage" contains path to window icon (16x16) +# needed for primary features only +windowImage=eclipse.png + +# Property "aboutImage" contains path to product image (500x330 or 115x164) +# needed for primary features only +aboutImage=eclipse_lg.png + +# Property "appName" contains name of the application (translated) +# needed for primary features only +appName=Eclipse + +# Property "welcomePage" contains path to welcome page (special XML-based format) +# ($nl$/ prefix to permit locale-specific translations of entire file) +#welcomePage=$nl$/welcome.xml + +# Property "welcomePerspective" contains the id of the perspective in which the +# welcome page is to be opened. +# optional + +# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page +# optional +#tipsAndTricksHref=/org.eclipse.platform.doc.user/tips/platform_tips.html + diff --git a/deprecated/org.eclipse.epp.package.papyrus/about.mappings b/deprecated/org.eclipse.epp.package.papyrus/about.mappings new file mode 100644 index 00000000000..0dfb7355d48 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/about.mappings @@ -0,0 +1,6 @@ +# about.mappings +# contains fill-ins for about.properties +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file does not need to be translated. + +0=@build@ diff --git a/deprecated/org.eclipse.epp.package.papyrus/about.properties b/deprecated/org.eclipse.epp.package.papyrus/about.properties new file mode 100644 index 00000000000..80ef4348e77 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/about.properties @@ -0,0 +1,28 @@ +############################################################################### +# Copyright (c) 2000, 2010 IBM Corporation 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# about.properties +# contains externalized strings for about.ini +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# fill-ins are supplied by about.mappings +# This file should be translated. +# +# Do not translate any values surrounded by {} + +blurb=Eclipse Modeling Tools\n\ +\n\ +Version: {featureVersion}\n\ +Build id: {0}\n\ +\n\ +(c) Copyright Eclipse contributors and others 2000, 2010. All rights reserved.\n\ +Visit http://www.eclipse.org/platform\n\ +\n\ +This product includes software developed by the\n\ +Apache Software Foundation http://www.apache.org/ diff --git a/deprecated/org.eclipse.epp.package.papyrus/buckminster.cspex b/deprecated/org.eclipse.epp.package.papyrus/buckminster.cspex new file mode 100644 index 00000000000..3e45f2dc6c4 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/buckminster.cspex @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus/build.properties b/deprecated/org.eclipse.epp.package.papyrus/build.properties new file mode 100644 index 00000000000..4bcf744ecb1 --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/build.properties @@ -0,0 +1,15 @@ +bin.includes = META-INF/,\ + plugin_customization.ini,\ + plugin.xml,\ + about.html,\ + eclipse.gif,\ + eclipse.png,\ + eclipse32.gif,\ + eclipse32.png,\ + eclipse48.gif,\ + eclipse48.png,\ + eclipse_lg.gif,\ + about.mappings,\ + intro-eclipse.png,\ + about.properties,\ + about.ini diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse.gif b/deprecated/org.eclipse.epp.package.papyrus/eclipse.gif new file mode 100644 index 00000000000..7d7e32b2c0d Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse.gif differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse.png b/deprecated/org.eclipse.epp.package.papyrus/eclipse.png new file mode 100644 index 00000000000..25e3bb5ea62 Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse.png differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse32.gif b/deprecated/org.eclipse.epp.package.papyrus/eclipse32.gif new file mode 100644 index 00000000000..e6ad7ccd75b Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse32.gif differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse32.png b/deprecated/org.eclipse.epp.package.papyrus/eclipse32.png new file mode 100644 index 00000000000..568fac1d05f Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse32.png differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse48.gif b/deprecated/org.eclipse.epp.package.papyrus/eclipse48.gif new file mode 100644 index 00000000000..80a40d68057 Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse48.gif differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse48.png b/deprecated/org.eclipse.epp.package.papyrus/eclipse48.png new file mode 100644 index 00000000000..1c939c81634 Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse48.png differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/eclipse_lg.gif b/deprecated/org.eclipse.epp.package.papyrus/eclipse_lg.gif new file mode 100644 index 00000000000..bf8b872e3d5 Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/eclipse_lg.gif differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/intro-eclipse.png b/deprecated/org.eclipse.epp.package.papyrus/intro-eclipse.png new file mode 100644 index 00000000000..015e7fc6ca4 Binary files /dev/null and b/deprecated/org.eclipse.epp.package.papyrus/intro-eclipse.png differ diff --git a/deprecated/org.eclipse.epp.package.papyrus/plugin.xml b/deprecated/org.eclipse.epp.package.papyrus/plugin.xml new file mode 100644 index 00000000000..35600130c0c --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/plugin.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.epp.package.papyrus/plugin_customization.ini b/deprecated/org.eclipse.epp.package.papyrus/plugin_customization.ini new file mode 100644 index 00000000000..d482ff007ff --- /dev/null +++ b/deprecated/org.eclipse.epp.package.papyrus/plugin_customization.ini @@ -0,0 +1,37 @@ +# plugin_customization.ini +# sets default values for plug-in-specific preferences +# keys are qualified by plug-in id +# e.g., com.example.acmeplugin/myproperty=myvalue +# modeling.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in plugin_customization.properties +# This file does not need to be translated. + +# WARNING: This file defines the preference overrides for the Platform build +# (the one with no JDT or PDE), not the SDK build (aka the IDE). +# For the SDK build, use the plugin_customization.ini file in the +# org.eclipse.sdk plug-in instead. + +# Property "org.eclipse.ui/defaultPerspectiveId" controls the +# perspective that the workbench opens initially +org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaPerspective + +# new-style tabs by default +org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false + +# put the perspective switcher on the top right +org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight + +# show progress on startup +org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true + +# Welcome theme to use +org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.circles + +# Root page links to show in the Universal Welcome +org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew + +# Initial page layout of the Universal Welcome +org.eclipse.ui.intro.universal/INTRO_DATA = product:introData.xml + +# Order help books in table of contents +org.eclipse.help/HELP_DATA = helpData.xml \ No newline at end of file diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/.project b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/.project deleted file mode 100644 index 5c7c9b3f00a..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.epp.package.papyrus.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/build.properties b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/build.properties deleted file mode 100644 index 7d2d8724f28..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -bin.includes = feature.xml,\ - p2.inf,\ - epl-v10.html,\ - license.html,\ - feature.properties,\ - plugin_customization.ini -includeLaunchers = false diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml deleted file mode 100644 index 370e83fbfb4..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/eclipse_papyrus_helios.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - incubating components, as indicated by feature numbers less than 1.0.0 on the feature list.]]> - - - Cédric Brun - Markus Knauer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epl-v10.html b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epl-v10.html deleted file mode 100644 index 2e85bcbd1ac..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epl-v10.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - -Eclipse Public License - Version 1.0 - - - - - - -

    Eclipse Public License - v 1.0

    - -

    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE -PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR -DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS -AGREEMENT.

    - -

    1. DEFINITIONS

    - -

    "Contribution" means:

    - -

    a) in the case of the initial Contributor, the initial -code and documentation distributed under this Agreement, and

    -

    b) in the case of each subsequent Contributor:

    -

    i) changes to the Program, and

    -

    ii) additions to the Program;

    -

    where such changes and/or additions to the Program -originate from and are distributed by that particular Contributor. A -Contribution 'originates' from a Contributor if it was added to the -Program by such Contributor itself or anyone acting on such -Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) -are not derivative works of the Program.

    - -

    "Contributor" means any person or entity that distributes -the Program.

    - -

    "Licensed Patents" mean patent claims licensable by a -Contributor which are necessarily infringed by the use or sale of its -Contribution alone or when combined with the Program.

    - -

    "Program" means the Contributions distributed in accordance -with this Agreement.

    - -

    "Recipient" means anyone who receives the Program under -this Agreement, including all Contributors.

    - -

    2. GRANT OF RIGHTS

    - -

    a) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free copyright license to reproduce, prepare derivative works -of, publicly display, publicly perform, distribute and sublicense the -Contribution of such Contributor, if any, and such derivative works, in -source code and object code form.

    - -

    b) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free patent license under Licensed Patents to make, use, sell, -offer to sell, import and otherwise transfer the Contribution of such -Contributor, if any, in source code and object code form. This patent -license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered -by the Licensed Patents. The patent license shall not apply to any other -combinations which include the Contribution. No hardware per se is -licensed hereunder.

    - -

    c) Recipient understands that although each Contributor -grants the licenses to its Contributions set forth herein, no assurances -are provided by any Contributor that the Program does not infringe the -patent or other intellectual property rights of any other entity. Each -Contributor disclaims any liability to Recipient for claims brought by -any other entity based on infringement of intellectual property rights -or otherwise. As a condition to exercising the rights and licenses -granted hereunder, each Recipient hereby assumes sole responsibility to -secure any other intellectual property rights needed, if any. For -example, if a third party patent license is required to allow Recipient -to distribute the Program, it is Recipient's responsibility to acquire -that license before distributing the Program.

    - -

    d) Each Contributor represents that to its knowledge it -has sufficient copyright rights in its Contribution, if any, to grant -the copyright license set forth in this Agreement.

    - -

    3. REQUIREMENTS

    - -

    A Contributor may choose to distribute the Program in object code -form under its own license agreement, provided that:

    - -

    a) it complies with the terms and conditions of this -Agreement; and

    - -

    b) its license agreement:

    - -

    i) effectively disclaims on behalf of all Contributors -all warranties and conditions, express and implied, including warranties -or conditions of title and non-infringement, and implied warranties or -conditions of merchantability and fitness for a particular purpose;

    - -

    ii) effectively excludes on behalf of all Contributors -all liability for damages, including direct, indirect, special, -incidental and consequential damages, such as lost profits;

    - -

    iii) states that any provisions which differ from this -Agreement are offered by that Contributor alone and not by any other -party; and

    - -

    iv) states that source code for the Program is available -from such Contributor, and informs licensees how to obtain it in a -reasonable manner on or through a medium customarily used for software -exchange.

    - -

    When the Program is made available in source code form:

    - -

    a) it must be made available under this Agreement; and

    - -

    b) a copy of this Agreement must be included with each -copy of the Program.

    - -

    Contributors may not remove or alter any copyright notices contained -within the Program.

    - -

    Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution.

    - -

    4. COMMERCIAL DISTRIBUTION

    - -

    Commercial distributors of software may accept certain -responsibilities with respect to end users, business partners and the -like. While this license is intended to facilitate the commercial use of -the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create -potential liability for other Contributors. Therefore, if a Contributor -includes the Program in a commercial product offering, such Contributor -("Commercial Contributor") hereby agrees to defend and -indemnify every other Contributor ("Indemnified Contributor") -against any losses, damages and costs (collectively "Losses") -arising from claims, lawsuits and other legal actions brought by a third -party against the Indemnified Contributor to the extent caused by the -acts or omissions of such Commercial Contributor in connection with its -distribution of the Program in a commercial product offering. The -obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In -order to qualify, an Indemnified Contributor must: a) promptly notify -the Commercial Contributor in writing of such claim, and b) allow the -Commercial Contributor to control, and cooperate with the Commercial -Contributor in, the defense and any related settlement negotiations. The -Indemnified Contributor may participate in any such claim at its own -expense.

    - -

    For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance -claims and warranties are such Commercial Contributor's responsibility -alone. Under this section, the Commercial Contributor would have to -defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other -Contributor to pay any damages as a result, the Commercial Contributor -must pay those damages.

    - -

    5. NO WARRANTY

    - -

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS -PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS -OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY -OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely -responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement , including but not limited to -the risks and costs of program errors, compliance with applicable laws, -damage to or loss of data, programs or equipment, and unavailability or -interruption of operations.

    - -

    6. DISCLAIMER OF LIABILITY

    - -

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT -NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR -DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED -HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    - -

    7. GENERAL

    - -

    If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable.

    - -

    If Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other -software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the -date such litigation is filed.

    - -

    All Recipient's rights under this Agreement shall terminate if it -fails to comply with any of the material terms or conditions of this -Agreement and does not cure such failure in a reasonable period of time -after becoming aware of such noncompliance. If all Recipient's rights -under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive.

    - -

    Everyone is permitted to copy and distribute copies of this -Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The -Agreement Steward reserves the right to publish new versions (including -revisions) of this Agreement from time to time. No one other than the -Agreement Steward has the right to modify this Agreement. The Eclipse -Foundation is the initial Agreement Steward. The Eclipse Foundation may -assign the responsibility to serve as the Agreement Steward to a -suitable separate entity. Each new version of the Agreement will be -given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the -Agreement under which it was received. In addition, after a new version -of the Agreement is published, Contributor may elect to distribute the -Program (including its Contributions) under the new version. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no -rights or licenses to the intellectual property of any Contributor under -this Agreement, whether expressly, by implication, estoppel or -otherwise. All rights in the Program not expressly granted under this -Agreement are reserved.

    - -

    This Agreement is governed by the laws of the State of New York and -the intellectual property laws of the United States of America. No party -to this Agreement will bring a legal action under this Agreement more -than one year after the cause of action arose. Each party waives its -rights to a jury trial in any resulting litigation.

    - - - - \ No newline at end of file diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epp.product b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epp.product deleted file mode 100644 index d88a8200ff1..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/epp.product +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - Specified in the plugin.xml of the branding plugin. - - - - - - - - -product org.eclipse.epp.package.papyrus.product ---launcher.defaultAction openFile - --launcher.XXMaxPermSize -256M - -Dosgi.requiredJavaVersion=1.5 --Xms40m --Xmx512m - -XX:MaxPermSize=256m - -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts --XX:MaxPermSize=256m - - - - - - - - - - - - - - - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5 - - - - - - - - - - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.properties b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.properties deleted file mode 100644 index 9c9df421fba..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.properties +++ /dev/null @@ -1,130 +0,0 @@ -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=license.html - -# "license" property - text of the "Feature Update License" -# should be plain text version of license agreement pointed to be "licenseURL" -license=\ -Eclipse Foundation Software User Agreement\n\ -April 14, 2010\n\ -\n\ -Usage Of Content\n\ -\n\ -THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ -OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ -USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ -AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ -NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ -AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ -AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ -OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ -TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ -OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ -BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ -\n\ -Applicable Licenses\n\ -\n\ -Unless otherwise indicated, all Content made available by the\n\ -Eclipse Foundation is provided to you under the terms and conditions of\n\ -the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\ -provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ -For purposes of the EPL, "Program" will mean the Content.\n\ -\n\ -Content includes, but is not limited to, source code, object code,\n\ -documentation and other files maintained in the Eclipse Foundation source code\n\ -repository ("Repository") in software modules ("Modules") and made available\n\ -as downloadable archives ("Downloads").\n\ -\n\ - - Content may be structured and packaged into modules to facilitate delivering,\n\ - extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ - plug-in fragments ("Fragments"), and features ("Features").\n\ - - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\ - in a directory named "plugins".\n\ - - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ - Each Feature may be packaged as a sub-directory in a directory named "features".\n\ - Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ - numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ - - Features may also include other Features ("Included Features"). Within a Feature, files\n\ - named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ -\n\ -The terms and conditions governing Plug-ins and Fragments should be\n\ -contained in files named "about.html" ("Abouts"). The terms and\n\ -conditions governing Features and Included Features should be contained\n\ -in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ -Licenses may be located in any directory of a Download or Module\n\ -including, but not limited to the following locations:\n\ -\n\ - - The top-level (root) directory\n\ - - Plug-in and Fragment directories\n\ - - Inside Plug-ins and Fragments packaged as JARs\n\ - - Sub-directories of the directory named "src" of certain Plug-ins\n\ - - Feature directories\n\ -\n\ -Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ -Provisioning Technology (as defined below), you must agree to a license ("Feature \n\ -Update License") during the installation process. If the Feature contains\n\ -Included Features, the Feature Update License should either provide you\n\ -with the terms and conditions governing the Included Features or inform\n\ -you where you can locate them. Feature Update Licenses may be found in\n\ -the "license" property of files named "feature.properties" found within a Feature.\n\ -Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\ -terms and conditions (or references to such terms and conditions) that\n\ -govern your use of the associated Content in that directory.\n\ -\n\ -THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\ -TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ -SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ -\n\ - - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ - - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ - - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ - - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ - - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ -\n\ -IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ -TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\ -is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ -govern that particular Content.\n\ -\n\ -\n\Use of Provisioning Technology\n\ -\n\ -The Eclipse Foundation makes available provisioning software, examples of which include,\n\ -but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\ -the purpose of allowing users to install software, documentation, information and/or\n\ -other materials (collectively "Installable Software"). This capability is provided with\n\ -the intent of allowing such users to install, extend and update Eclipse-based products.\n\ -Information about packaging Installable Software is available at\n\ -http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ -\n\ -You may use Provisioning Technology to allow other parties to install Installable Software.\n\ -You shall be responsible for enabling the applicable license agreements relating to the\n\ -Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\ -in accordance with the Specification. By using Provisioning Technology in such a manner and\n\ -making it available in accordance with the Specification, you further acknowledge your\n\ -agreement to, and the acquisition of all necessary rights to permit the following:\n\ -\n\ - 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\ - the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\ - extending or updating the functionality of an Eclipse-based product.\n\ - 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\ - Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\ - 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\ - govern the use of the Installable Software ("Installable Software Agreement") and such\n\ - Installable Software Agreement shall be accessed from the Target Machine in accordance\n\ - with the Specification. Such Installable Software Agreement must inform the user of the\n\ - terms and conditions that govern the Installable Software and must solicit acceptance by\n\ - the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\ - indication of agreement by the user, the provisioning Technology will complete installation\n\ - of the Installable Software.\n\ -\n\ -Cryptography\n\ -\n\ -Content may contain encryption software. The country in which you are\n\ -currently may have restrictions on the import, possession, and use,\n\ -and/or re-export to another country, of encryption software. BEFORE\n\ -using any encryption software, please check the country's laws,\n\ -regulations and policies concerning the import, possession, or use, and\n\ -re-export of encryption software, to see if this is permitted.\n\ -\n\ -Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n -########### end of license property ########################################## diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.xml b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.xml deleted file mode 100644 index 9c267c277eb..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/feature.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - This modeling package contains a collection of Eclipse Modeling Project components, including EMF, GMF, MDT XSD/OCL/UML2, M2M, M2T, and EMFT elements. It includes a complete SDK, developer tools and source code. Note that the Modeling package includes some incubating components, as indicated by feature numbers less than 1.0.0 on the feature list. - - - - %license - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/license.html b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/license.html deleted file mode 100644 index 69305408635..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/license.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - -Eclipse Foundation Software User Agreement - - - -

    Eclipse Foundation Software User Agreement

    -

    April 14, 2010

    - -

    Usage Of Content

    - -

    THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS - (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND - CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE - OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR - NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND - CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

    - -

    Applicable Licenses

    - -

    Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 - ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. - For purposes of the EPL, "Program" will mean the Content.

    - -

    Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code - repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").

    - -
      -
    • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
    • -
    • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
    • -
    • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins - and/or Fragments associated with that Feature.
    • -
    • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
    • -
    - -

    The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and -Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module -including, but not limited to the following locations:

    - -
      -
    • The top-level (root) directory
    • -
    • Plug-in and Fragment directories
    • -
    • Inside Plug-ins and Fragments packaged as JARs
    • -
    • Sub-directories of the directory named "src" of certain Plug-ins
    • -
    • Feature directories
    • -
    - -

    Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the -installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or -inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. -Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in -that directory.

    - -

    THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE -OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

    - - - -

    IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please -contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

    - - -

    Use of Provisioning Technology

    - -

    The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse - Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or - other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to - install, extend and update Eclipse-based products. Information about packaging Installable Software is available at http://eclipse.org/equinox/p2/repository_packaging.html - ("Specification").

    - -

    You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the - applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology - in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the - Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:

    - -
      -
    1. A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology - on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based - product.
    2. -
    3. During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be - accessed and copied to the Target Machine.
    4. -
    5. Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable - Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target - Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern - the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such - indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.
    6. -
    - -

    Cryptography

    - -

    Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to - another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, - possession, or use, and re-export of encryption software, to see if this is permitted.

    - -

    Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.

    - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/p2.inf b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/p2.inf deleted file mode 100644 index 47b3c3edda8..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/p2.inf +++ /dev/null @@ -1,8 +0,0 @@ -#tell pde.build not to generate start levels -org.eclipse.pde.build.append.startlevels=false - -#add requirement on org.eclipse.platform.ide -requires.1.namespace=org.eclipse.equinox.p2.iu -requires.1.name=org.eclipse.platform.ide -#requires.1.range=[3.5.0.I20090522-1710,3.5.0.I20090522-1710] -requires.1.greedy=true diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini b/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini deleted file mode 100644 index ecdf68e87a3..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus.feature/plugin_customization.ini +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/.project b/extraplugins/rcp/org.eclipse.epp.package.papyrus/.project deleted file mode 100644 index 232ced80263..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.eclipse.epp.package.papyrus - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF b/extraplugins/rcp/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF deleted file mode 100644 index 2931b10f086..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: EPP Papyrus Bundle -Bundle-SymbolicName: org.eclipse.epp.package.papyrus;singleton:=true -Bundle-Version: 0.7.1.qualifier -Bundle-Vendor: Eclipse.org - EPP -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.platform, - org.eclipse.equinox.app diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.html b/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.html deleted file mode 100644 index 97ad4ef97ce..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

    About This Content

    - -

    June, 2010

    -

    License

    - -

    The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

    - -

    If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

    - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.ini b/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.ini deleted file mode 100644 index 408d6f3f39f..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.ini +++ /dev/null @@ -1,37 +0,0 @@ -# about.ini -# contains information about a feature -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# "%key" are externalized strings defined in about.properties -# This file does not need to be translated. - -# Property "aboutText" contains blurb for feature details in the "About" -# dialog (translated). Maximum 15 lines and 75 characters per line. -aboutText=%blurb - -# Property "featureImage" contains path to feature image (32x32) -featureImage=eclipse32.png - -# Property "windowImage" contains path to window icon (16x16) -# needed for primary features only -windowImage=eclipse.png - -# Property "aboutImage" contains path to product image (500x330 or 115x164) -# needed for primary features only -aboutImage=eclipse_lg.png - -# Property "appName" contains name of the application (translated) -# needed for primary features only -appName=Eclipse - -# Property "welcomePage" contains path to welcome page (special XML-based format) -# ($nl$/ prefix to permit locale-specific translations of entire file) -#welcomePage=$nl$/welcome.xml - -# Property "welcomePerspective" contains the id of the perspective in which the -# welcome page is to be opened. -# optional - -# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page -# optional -#tipsAndTricksHref=/org.eclipse.platform.doc.user/tips/platform_tips.html - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.mappings b/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.mappings deleted file mode 100644 index 0dfb7355d48..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.mappings +++ /dev/null @@ -1,6 +0,0 @@ -# about.mappings -# contains fill-ins for about.properties -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file does not need to be translated. - -0=@build@ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.properties b/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.properties deleted file mode 100644 index 80ef4348e77..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/about.properties +++ /dev/null @@ -1,28 +0,0 @@ -############################################################################### -# Copyright (c) 2000, 2010 IBM Corporation 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -# about.properties -# contains externalized strings for about.ini -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# fill-ins are supplied by about.mappings -# This file should be translated. -# -# Do not translate any values surrounded by {} - -blurb=Eclipse Modeling Tools\n\ -\n\ -Version: {featureVersion}\n\ -Build id: {0}\n\ -\n\ -(c) Copyright Eclipse contributors and others 2000, 2010. All rights reserved.\n\ -Visit http://www.eclipse.org/platform\n\ -\n\ -This product includes software developed by the\n\ -Apache Software Foundation http://www.apache.org/ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/buckminster.cspex b/extraplugins/rcp/org.eclipse.epp.package.papyrus/buckminster.cspex deleted file mode 100644 index 3e45f2dc6c4..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/buckminster.cspex +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/build.properties b/extraplugins/rcp/org.eclipse.epp.package.papyrus/build.properties deleted file mode 100644 index 4bcf744ecb1..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -bin.includes = META-INF/,\ - plugin_customization.ini,\ - plugin.xml,\ - about.html,\ - eclipse.gif,\ - eclipse.png,\ - eclipse32.gif,\ - eclipse32.png,\ - eclipse48.gif,\ - eclipse48.png,\ - eclipse_lg.gif,\ - about.mappings,\ - intro-eclipse.png,\ - about.properties,\ - about.ini diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.gif b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.gif deleted file mode 100644 index 7d7e32b2c0d..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.gif and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.png b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.png deleted file mode 100644 index 25e3bb5ea62..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse.png and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.gif b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.gif deleted file mode 100644 index e6ad7ccd75b..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.gif and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.png b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.png deleted file mode 100644 index 568fac1d05f..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse32.png and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.gif b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.gif deleted file mode 100644 index 80a40d68057..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.gif and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.png b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.png deleted file mode 100644 index 1c939c81634..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse48.png and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse_lg.gif b/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse_lg.gif deleted file mode 100644 index bf8b872e3d5..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/eclipse_lg.gif and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/intro-eclipse.png b/extraplugins/rcp/org.eclipse.epp.package.papyrus/intro-eclipse.png deleted file mode 100644 index 015e7fc6ca4..00000000000 Binary files a/extraplugins/rcp/org.eclipse.epp.package.papyrus/intro-eclipse.png and /dev/null differ diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin.xml b/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin.xml deleted file mode 100644 index 35600130c0c..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin_customization.ini b/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin_customization.ini deleted file mode 100644 index d482ff007ff..00000000000 --- a/extraplugins/rcp/org.eclipse.epp.package.papyrus/plugin_customization.ini +++ /dev/null @@ -1,37 +0,0 @@ -# plugin_customization.ini -# sets default values for plug-in-specific preferences -# keys are qualified by plug-in id -# e.g., com.example.acmeplugin/myproperty=myvalue -# modeling.io.Properties file (ISO 8859-1 with "\" escapes) -# "%key" are externalized strings defined in plugin_customization.properties -# This file does not need to be translated. - -# WARNING: This file defines the preference overrides for the Platform build -# (the one with no JDT or PDE), not the SDK build (aka the IDE). -# For the SDK build, use the plugin_customization.ini file in the -# org.eclipse.sdk plug-in instead. - -# Property "org.eclipse.ui/defaultPerspectiveId" controls the -# perspective that the workbench opens initially -org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaPerspective - -# new-style tabs by default -org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false - -# put the perspective switcher on the top right -org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight - -# show progress on startup -org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true - -# Welcome theme to use -org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.circles - -# Root page links to show in the Universal Welcome -org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew - -# Initial page layout of the Universal Welcome -org.eclipse.ui.intro.universal/INTRO_DATA = product:introData.xml - -# Order help books in table of contents -org.eclipse.help/HELP_DATA = helpData.xml \ No newline at end of file -- cgit v1.2.3 From 68a81567379b95f0e11e40b529435098c5bbda36 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:33:25 +0100 Subject: [Releng] Move the umltools.clazz plug-in to the deprecated folder --- .../.classpath | 7 + .../.project | 28 +++ .../META-INF/MANIFEST.MF | 12 + .../build.properties | 4 + .../icons/ClassDiagram.gif | Bin 0 -> 120 bytes .../plugin.xml | 72 ++++++ .../umltools/clazz/ClassDiagramEditorFactory.java | 124 ++++++++++ .../umltools/clazz/ClassDiagramEditorModel.java | 155 ++++++++++++ .../umltools/clazz/CreateClassDiagramHandler.java | 259 +++++++++++++++++++++ .../clazz/UmlClassDiagramForMultiEditor.java | 161 +++++++++++++ .../.classpath | 7 - .../.project | 28 --- .../META-INF/MANIFEST.MF | 12 - .../build.properties | 4 - .../icons/ClassDiagram.gif | Bin 120 -> 0 bytes .../plugin.xml | 72 ------ .../umltools/clazz/ClassDiagramEditorFactory.java | 124 ---------- .../umltools/clazz/ClassDiagramEditorModel.java | 155 ------------ .../umltools/clazz/CreateClassDiagramHandler.java | 259 --------------------- .../clazz/UmlClassDiagramForMultiEditor.java | 161 ------------- 20 files changed, 822 insertions(+), 822 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.classpath create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.project create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/build.properties create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java create mode 100644 deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.classpath delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.project delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/build.properties delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java delete mode 100644 extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.classpath b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.classpath new file mode 100644 index 00000000000..45f024e850e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.project b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.project new file mode 100644 index 00000000000..62152d80745 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.diagram.umltools.clazz + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..44c7a0051e4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Clazz +Bundle-SymbolicName: org.eclipse.papyrus.diagram.umltools.clazz;singleton:=true +Bundle-Version: 0.7.0.qualifier +Export-Package: org.eclipse.papyrus.diagram.umltools.clazz +Require-Bundle: org.eclipse.uml2.diagram.clazz;bundle-version="0.9.0", + org.eclipse.ui.ide;bundle-version="3.5.1", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.emf.common.ui;bundle-version="2.5.0", + org.eclipse.papyrus.core;bundle-version="0.7.0", + org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.7.0" diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/build.properties b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/build.properties new file mode 100644 index 00000000000..53c8b373787 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif new file mode 100644 index 00000000000..edf2be7e83d Binary files /dev/null and b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif differ diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml new file mode 100644 index 00000000000..dff8aaf444b --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java new file mode 100644 index 00000000000..ea4e01b9a6c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java @@ -0,0 +1,124 @@ +/***************************************************************************** + * Copyright (c) 2008 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.diagram.umltools.clazz; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor; +import org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory; +import org.eclipse.papyrus.core.services.ServicesRegistry; +import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel; + +/** + * @author dumoulin + * + */ +public class ClassDiagramEditorFactory implements IPluggableEditorFactory { + + /** + * Expected diagram type + */ + private String expectedType; + + /** + * Main service Registry. + * Initialized when the factory is registered to the main editor. + */ + private ServicesRegistry servicesRegistry; + + /** + * Editor Descriptor containing data from the Eclipse extension declaration. + */ + private EditorDescriptor editorDescriptor; + + /** + * @param diagramClass + * @param expectedType + */ + public ClassDiagramEditorFactory() { + expectedType = getDiagramNotationID(); + } + + /** + * Initialize the factory. + * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#init(org.eclipse.papyrus.core.services.ServicesRegistry, org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor) + * + * @param serviceRegistry + * @param editorDescriptor + */ + public void init(ServicesRegistry serviceRegistry, EditorDescriptor editorDescriptor) { + this.servicesRegistry = serviceRegistry; + this.editorDescriptor = editorDescriptor; + + } + + /** + * Return true if this PageModelFactory can create a PageModel for the specified pageIdentifier. + * The pageIdentifier is an instance of Diagram. + * + * @see org.eclipse.papyrus.core.extension.diagrameditor.IEditorFactory#isPageModelFactoryFor(java.lang.Object) + * @param pageIdentifier + * @return + * + */ + public boolean isPageModelFactoryFor(Object pageIdentifier) { + + if(pageIdentifier instanceof Diagram) { + Diagram diagram = (Diagram)pageIdentifier; + final String type = diagram.getType(); + return getExpectedType().equals(type); + } + // no + return false; + + } + + /** + * Create a new instance of the EditorModel for the specified pageIdentifier. + * @see org.eclipse.papyrus.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object) + * + * @param pageIdentifier + * @return + */ + public IPageModel createIPageModel(Object pageIdentifier) { + return new ClassDiagramEditorModel((Diagram)pageIdentifier, servicesRegistry, editorDescriptor); + } + + /** + * @return the diagramClass + */ +// private Class getDiagramClass() { +// return diagramClass; +// } + + + /** + * @return the expectedType + */ + private String getExpectedType() { + return expectedType; + } + + /** + * Get the ID identifying the type of the Diagram. + * {@inheritDoc} + */ + protected String getDiagramNotationID() { + return org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart.MODEL_ID; + } + + + + +} diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java new file mode 100644 index 00000000000..cd6f7df4192 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java @@ -0,0 +1,155 @@ +package org.eclipse.papyrus.diagram.umltools.clazz; + +import java.lang.reflect.Constructor; + +import org.eclipse.gef.ui.parts.GraphicalEditor; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.papyrus.core.editor.BackboneException; +import org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor; +import org.eclipse.papyrus.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry; +import org.eclipse.papyrus.core.services.ServiceException; +import org.eclipse.papyrus.core.services.ServicesRegistry; +import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.EditorActionBarContributor; + +/** + * IEditorModel used by the SashEditor to create a nested editor. + * Each nested editor instance is associated to one and only one instance of this model. + * + * @author cedric dumoulin + * + */ +class ClassDiagramEditorModel implements IEditorModel { + + /** + * The Diagram object describing the diagram. + */ + private Diagram diagram; + + /** + * The servicesRegistry provided at creation. + */ + private ServicesRegistry servicesRegistry; + + /** + * Editor Descriptor containing data from the Eclipse extension + */ + private EditorDescriptor editorDescriptor; + + /** + * + * Constructor. + * + * @param pageIdentifier + * @param servicesRegistry + * @param editorDescriptor + */ + public ClassDiagramEditorModel(Diagram pageIdentifier, ServicesRegistry servicesRegistry, EditorDescriptor editorDescriptor) { + diagram = pageIdentifier; + this.servicesRegistry = servicesRegistry; + this.editorDescriptor = editorDescriptor; + } + + /** + * Create the IEditor for the diagram. + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#createIEditorPart() + * @return + * @throws PartInitException + * + */ + public IEditorPart createIEditorPart() throws PartInitException { + GraphicalEditor editor; + try { + editor = new UmlClassDiagramForMultiEditor(servicesRegistry, diagram); + } catch (BackboneException e) { + throw new PartInitException("Can't create instance of " + UmlClassDiagramForMultiEditor.class.getName(), e); + } catch (ServiceException e) { + throw new PartInitException("Can't create instance of " + UmlClassDiagramForMultiEditor.class.getName(), e); + } + + return editor; + + } + + /** + * Get the action bar requested by the Editor. + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#getActionBarContributor() + * @return + * + */ + public EditorActionBarContributor getActionBarContributor() { + + String actionBarId = editorDescriptor.getActionBarContributorId(); + + // Do nothing if no EditorActionBarContributor is specify. + if(actionBarId == null || actionBarId.length() == 0) { + return null; + } + + // Try to get it. + + // Get ServiceRegistry + // ServicesRegistry serviceRegistry = getServicesRegistry(); + ActionBarContributorRegistry registry; + try { + registry = (ActionBarContributorRegistry)servicesRegistry.getService(ActionBarContributorRegistry.class); + } catch (ServiceException e) { + // Service not found + // TODO Log the error + e.printStackTrace(); + return null; + } + + try { + return registry.getActionBarContributor(actionBarId); + } catch (BackboneException e) { + // TODO Log the error and throw an exception instead + e.printStackTrace(); + return null; + } + } + + /** + * Get the underlying RawModel. Return the Diagram. + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getRawModel() + * @return + * + */ + public Object getRawModel() { + return diagram; + } + + /** + * Get the icon to be shown by Tabs + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabIcon() + * @return + * + */ + public Image getTabIcon() { + ImageDescriptor imageDescriptor = editorDescriptor.getIcon(); + if(imageDescriptor == null) + return null; + + return imageDescriptor.createImage(); + } + + /** + * Get the title of the Diagram. + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabTitle() + * @return + * + */ + public String getTabTitle() { + return diagram.getName(); + } + +} diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java new file mode 100644 index 00000000000..3711c1a54e5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java @@ -0,0 +1,259 @@ +/** + * + */ +package org.eclipse.papyrus.diagram.umltools.clazz; + +import java.util.Collections; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.commands.operations.OperationHistoryFactory; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.gmf.runtime.diagram.core.services.ViewService; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.core.utils.BusinessModelResolver; +import org.eclipse.papyrus.core.utils.EditorUtils; +import org.eclipse.papyrus.sasheditor.contentprovider.di.IPageMngr; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; +import org.eclipse.uml2.uml.UMLFactory; + + +/** + * A Handler responsible to create the EObject representing a UmlTools class diagram. + * The handler also add the created EObject to the SashContainerProvider. In reaction, the SashEditor + * will instanciate the corresponding Editor. + * + * @author cedric dumoulin + * + */ +public class CreateClassDiagramHandler extends AbstractHandler implements IHandler { + + /** + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + * + * @param event + * @return + * @throws ExecutionException + */ + + public Object execute(ExecutionEvent event) throws ExecutionException { + + // Choose one of the two execution mode. + executeAsTransaction(event); +// doExecute(event); + // Return null, as required by the API + return null; + } + + /** + * Execute the handler in a undoable transaction. + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + * + * @param event + * @return + * @throws ExecutionException + */ + + public void executeAsTransaction(final ExecutionEvent event) throws ExecutionException { + + TransactionalEditingDomain editingDomain = EditorUtils.getTransactionalEditingDomain(); + + // Create a transactional command. + AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,"Create Class Diagram", Collections.EMPTY_LIST) { + + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) + throws ExecutionException { + + CommandResult commandResult; + try { + // Call the real implementation + CreateClassDiagramHandler.this.doExecute(event); + commandResult = CommandResult.newOKCommandResult(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + commandResult = CommandResult.newErrorCommandResult("Error during diagram creation"); + } + return commandResult; + } + }; + + // Execute the command + try { + OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null); + } catch (ExecutionException e) { + e.printStackTrace(); + // TODO log the error + } + } + + /** + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + * + * @param event + * @return + * @throws ExecutionException + */ + + public void doExecute(ExecutionEvent event) throws ExecutionException { + + // First, create the EObject used to represent the Editor. + // This is generally the root object used to instantiate the corresponding editor. + EObject editorRootObject = createEditorRootObject(); + // Then add the root object to the SashContainerProvider + IPageMngr pageMngr = EditorUtils.getIPageMngr(); + pageMngr.openPage(editorRootObject); + } + + /** + * Create the root object used to find the type of the editor to create, and provided to the new instance. + * + * @return + */ + private EObject createEditorRootObject() { + + String diagramName = "newDiagram"; + EObject associatedDomainRoot = getDomainRoot(); + Resource diagramResource = getDiagramResource(); + + Diagram diagram = ViewService.createDiagram(associatedDomainRoot, getDiagramNotationID(), getPreferenceHint()); + if(diagram != null) { + diagram.setName(diagramName); + // TODO : required ?? + diagram.setElement(associatedDomainRoot); + diagramResource.getContents().add(diagram); +// initializeModel(owner); +// initializeDiagram(diagram); + } + + + return diagram; + } + + /** + * Get the domain element that will be associated to the Diagram. + * chack if the selected element can be used as domain element. + * If nothing is found, create a domain element. + * @return The domain element that will be associated to the diagram. + * + */ + private EObject getDomainRoot() { + + EObject domainElement = getSelectedDomainElement(); + if( domainElement != null) + return domainElement; + + // Create one + return createDomainElement(); + } + + /** + * Create the domain element that will be associated to the Diagram. + * @return + */ + protected EObject createDomainElement() { + return UMLFactory.eINSTANCE.createModel(); + + } + + /** + * Get the domain element associated to the current selection. + * @return The domain EObject associated to the current Eclipse selection, or null. + */ + private EObject getSelectedDomainElement() { + EObject eObject = null; + Object selection = getCurrentSelection(); + if(selection != null) { + Object businessObject = getDomainModel(selection); + if(businessObject instanceof EObject) { + eObject = (EObject)businessObject; + } + } + return eObject; + } + + /** + * Get current selection first element. + * + * @return the selected element or null. + */ + private Object getCurrentSelection() { + ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); + if(selection instanceof IStructuredSelection) { + IStructuredSelection structuredSelection = (IStructuredSelection)selection; + return structuredSelection.getFirstElement(); + } + + return null; + } + + /** + * Get the domain object associated to the provided object, if any. + * The provided object is a graphical artifact (EditPart, View, ...) + * This method navigate throw the object if the object is a graphical artifact or a + * diagram artifact. + * + * @param object Graphical artifact associated to a domain object. + * @return Object The domain object associated to the graphical artifact. + */ + private Object getDomainModel(Object object) { + if(object instanceof EditPart) { + // Check model. It can be a GraphNode. + Object model = ((EditPart)object).getModel(); + // Check if it is a notation View + if(model instanceof View) { + return ((View)model).getElement(); + + } else + return model; + + } + else if(object instanceof View) { + return ((View)object).getElement(); + } + else + return object; + + } + + + /** + * Get the resource containing notation.Diagram. + * @return + */ + private Resource getDiagramResource() { + return EditorUtils.getDiResourceSet().getNotationResource(); + } + + /** + * Get the ID identifying the type of the Diagram. + * {@inheritDoc} + */ + protected String getDiagramNotationID() { + return org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart.MODEL_ID; + } + + /** + * {@inheritDoc} + */ + protected PreferencesHint getPreferenceHint() { + return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; + } + +} diff --git a/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java new file mode 100644 index 00000000000..36c7a2a6d99 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java @@ -0,0 +1,161 @@ +/** + * + */ +package org.eclipse.papyrus.diagram.umltools.clazz; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.emf.common.ui.URIEditorInput; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.GraphicalViewer; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.l10n.EditorMessages; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.papyrus.core.adaptor.gmf.GmfMultiDiagramDocumentProvider; +import org.eclipse.papyrus.core.editor.BackboneException; +import org.eclipse.papyrus.core.services.ServiceException; +import org.eclipse.papyrus.core.services.ServicesRegistry; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.PartInitException; +import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditor; + +/** + * An editor to be used in multitabs editor. This editor extends the original UML Activity Diagram. + * + * @author dumoulin + * + */ +public class UmlClassDiagramForMultiEditor extends UMLDiagramEditor { + + /** + * The diagram shown by this editor. + */ + private Diagram diagram; + + /** + * + */ + private ServicesRegistry servicesRegistry; + + /** + * Constructor for SashSystem v2. Context and required objects are retrieved from the + * ServiceRegistry. + * + * @throws BackboneException + * @throws ServiceException + * + */ + public UmlClassDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException { + this.servicesRegistry = servicesRegistry; + this.diagram = diagram; + + // Share the same editing provider + TransactionalEditingDomain editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class); + GmfMultiDiagramDocumentProvider documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain); + + // overrides editing domain created by super constructor + setDocumentProvider(documentProvider); + + } + + /** + * @return the diagram + */ + public Diagram getDiagram() { + return diagram; + } + + /** + * @param diagram + * the diagram to set + */ + public void setDiagram(Diagram diagram) { + this.diagram = diagram; + } + + /** + * Change visibility to public. + */ + @Override + public GraphicalViewer getGraphicalViewer() { + return super.getGraphicalViewer(); + } + + /** + * + */ + final protected IDocumentProvider getDocumentProvider(IEditorInput input) { + // System.out.println("getDocumentProvider(IEditorInput input)"); + if (input instanceof IFileEditorInput || input instanceof URIEditorInput) { + throw new UnsupportedOperationException("TODO !!!"); + } + return super.getDocumentProvider(input); + } + + /** + * @generated + */ + protected void setDocumentProvider(IEditorInput input) { + // Already set in the constructor. + } + + /** + * + */ + @Override + public void init(IEditorSite site, IEditorInput input) throws PartInitException { + super.init(site, input); + // Set name after calling super.init() + setPartName(getDiagram().getName()); + } + + /** + * + */ + @Override + public void setInput(IEditorInput input) { + try { + // We are in a nested editor. + // Provide an URI with fragment in order to reuse the same Resource and to + // set the diagram to the fragment. + // First, compute the URI + URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(diagram)); + System.err.println(this.getClass().getSimpleName() + ".setInput(" + uriInput.toString() + ")"); + doSetInput(uriInput, true); + } catch (CoreException x) { + String title = EditorMessages.Editor_error_setinput_title; + String msg = EditorMessages.Editor_error_setinput_message; + Shell shell = getSite().getShell(); + ErrorDialog.openError(shell, title, msg, x.getStatus()); + } + + } + + Composite splitter; + + @Override + protected void createGraphicalViewer(Composite parent) { + System.out.println("store Composite " + parent); + splitter = parent; + super.createGraphicalViewer(parent); + } + + @Override + public void setFocus() { + + // System.out.println("setFocus( " + ((Object)splitter).hashCode() + "):" + splitter.getChildren()); + splitter.setFocus(); + + super.setFocus(); + } + + public String getEditingDomainID() { + return "org.eclipse.uml2.diagram.clazz.EditingDomain"; + } + +} diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.classpath b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.classpath deleted file mode 100644 index 45f024e850e..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.project b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.project deleted file mode 100644 index 62152d80745..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.diagram.umltools.clazz - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF deleted file mode 100644 index 44c7a0051e4..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Clazz -Bundle-SymbolicName: org.eclipse.papyrus.diagram.umltools.clazz;singleton:=true -Bundle-Version: 0.7.0.qualifier -Export-Package: org.eclipse.papyrus.diagram.umltools.clazz -Require-Bundle: org.eclipse.uml2.diagram.clazz;bundle-version="0.9.0", - org.eclipse.ui.ide;bundle-version="3.5.1", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", - org.eclipse.emf.common.ui;bundle-version="2.5.0", - org.eclipse.papyrus.core;bundle-version="0.7.0", - org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.7.0" diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/build.properties b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/build.properties deleted file mode 100644 index 53c8b373787..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif deleted file mode 100644 index edf2be7e83d..00000000000 Binary files a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/icons/ClassDiagram.gif and /dev/null differ diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml deleted file mode 100644 index dff8aaf444b..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/plugin.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java deleted file mode 100644 index ea4e01b9a6c..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorFactory.java +++ /dev/null @@ -1,124 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.diagram.umltools.clazz; - -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor; -import org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory; -import org.eclipse.papyrus.core.services.ServicesRegistry; -import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel; - -/** - * @author dumoulin - * - */ -public class ClassDiagramEditorFactory implements IPluggableEditorFactory { - - /** - * Expected diagram type - */ - private String expectedType; - - /** - * Main service Registry. - * Initialized when the factory is registered to the main editor. - */ - private ServicesRegistry servicesRegistry; - - /** - * Editor Descriptor containing data from the Eclipse extension declaration. - */ - private EditorDescriptor editorDescriptor; - - /** - * @param diagramClass - * @param expectedType - */ - public ClassDiagramEditorFactory() { - expectedType = getDiagramNotationID(); - } - - /** - * Initialize the factory. - * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#init(org.eclipse.papyrus.core.services.ServicesRegistry, org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor) - * - * @param serviceRegistry - * @param editorDescriptor - */ - public void init(ServicesRegistry serviceRegistry, EditorDescriptor editorDescriptor) { - this.servicesRegistry = serviceRegistry; - this.editorDescriptor = editorDescriptor; - - } - - /** - * Return true if this PageModelFactory can create a PageModel for the specified pageIdentifier. - * The pageIdentifier is an instance of Diagram. - * - * @see org.eclipse.papyrus.core.extension.diagrameditor.IEditorFactory#isPageModelFactoryFor(java.lang.Object) - * @param pageIdentifier - * @return - * - */ - public boolean isPageModelFactoryFor(Object pageIdentifier) { - - if(pageIdentifier instanceof Diagram) { - Diagram diagram = (Diagram)pageIdentifier; - final String type = diagram.getType(); - return getExpectedType().equals(type); - } - // no - return false; - - } - - /** - * Create a new instance of the EditorModel for the specified pageIdentifier. - * @see org.eclipse.papyrus.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object) - * - * @param pageIdentifier - * @return - */ - public IPageModel createIPageModel(Object pageIdentifier) { - return new ClassDiagramEditorModel((Diagram)pageIdentifier, servicesRegistry, editorDescriptor); - } - - /** - * @return the diagramClass - */ -// private Class getDiagramClass() { -// return diagramClass; -// } - - - /** - * @return the expectedType - */ - private String getExpectedType() { - return expectedType; - } - - /** - * Get the ID identifying the type of the Diagram. - * {@inheritDoc} - */ - protected String getDiagramNotationID() { - return org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart.MODEL_ID; - } - - - - -} diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java deleted file mode 100644 index cd6f7df4192..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/ClassDiagramEditorModel.java +++ /dev/null @@ -1,155 +0,0 @@ -package org.eclipse.papyrus.diagram.umltools.clazz; - -import java.lang.reflect.Constructor; - -import org.eclipse.gef.ui.parts.GraphicalEditor; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.papyrus.core.editor.BackboneException; -import org.eclipse.papyrus.core.extension.diagrameditor.EditorDescriptor; -import org.eclipse.papyrus.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry; -import org.eclipse.papyrus.core.services.ServiceException; -import org.eclipse.papyrus.core.services.ServicesRegistry; -import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.EditorActionBarContributor; - -/** - * IEditorModel used by the SashEditor to create a nested editor. - * Each nested editor instance is associated to one and only one instance of this model. - * - * @author cedric dumoulin - * - */ -class ClassDiagramEditorModel implements IEditorModel { - - /** - * The Diagram object describing the diagram. - */ - private Diagram diagram; - - /** - * The servicesRegistry provided at creation. - */ - private ServicesRegistry servicesRegistry; - - /** - * Editor Descriptor containing data from the Eclipse extension - */ - private EditorDescriptor editorDescriptor; - - /** - * - * Constructor. - * - * @param pageIdentifier - * @param servicesRegistry - * @param editorDescriptor - */ - public ClassDiagramEditorModel(Diagram pageIdentifier, ServicesRegistry servicesRegistry, EditorDescriptor editorDescriptor) { - diagram = pageIdentifier; - this.servicesRegistry = servicesRegistry; - this.editorDescriptor = editorDescriptor; - } - - /** - * Create the IEditor for the diagram. - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#createIEditorPart() - * @return - * @throws PartInitException - * - */ - public IEditorPart createIEditorPart() throws PartInitException { - GraphicalEditor editor; - try { - editor = new UmlClassDiagramForMultiEditor(servicesRegistry, diagram); - } catch (BackboneException e) { - throw new PartInitException("Can't create instance of " + UmlClassDiagramForMultiEditor.class.getName(), e); - } catch (ServiceException e) { - throw new PartInitException("Can't create instance of " + UmlClassDiagramForMultiEditor.class.getName(), e); - } - - return editor; - - } - - /** - * Get the action bar requested by the Editor. - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#getActionBarContributor() - * @return - * - */ - public EditorActionBarContributor getActionBarContributor() { - - String actionBarId = editorDescriptor.getActionBarContributorId(); - - // Do nothing if no EditorActionBarContributor is specify. - if(actionBarId == null || actionBarId.length() == 0) { - return null; - } - - // Try to get it. - - // Get ServiceRegistry - // ServicesRegistry serviceRegistry = getServicesRegistry(); - ActionBarContributorRegistry registry; - try { - registry = (ActionBarContributorRegistry)servicesRegistry.getService(ActionBarContributorRegistry.class); - } catch (ServiceException e) { - // Service not found - // TODO Log the error - e.printStackTrace(); - return null; - } - - try { - return registry.getActionBarContributor(actionBarId); - } catch (BackboneException e) { - // TODO Log the error and throw an exception instead - e.printStackTrace(); - return null; - } - } - - /** - * Get the underlying RawModel. Return the Diagram. - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getRawModel() - * @return - * - */ - public Object getRawModel() { - return diagram; - } - - /** - * Get the icon to be shown by Tabs - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabIcon() - * @return - * - */ - public Image getTabIcon() { - ImageDescriptor imageDescriptor = editorDescriptor.getIcon(); - if(imageDescriptor == null) - return null; - - return imageDescriptor.createImage(); - } - - /** - * Get the title of the Diagram. - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabTitle() - * @return - * - */ - public String getTabTitle() { - return diagram.getName(); - } - -} diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java deleted file mode 100644 index 3711c1a54e5..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/CreateClassDiagramHandler.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * - */ -package org.eclipse.papyrus.diagram.umltools.clazz; - -import java.util.Collections; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.operations.OperationHistoryFactory; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gef.EditPart; -import org.eclipse.gmf.runtime.common.core.command.CommandResult; -import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; -import org.eclipse.gmf.runtime.diagram.core.services.ViewService; -import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.papyrus.core.utils.BusinessModelResolver; -import org.eclipse.papyrus.core.utils.EditorUtils; -import org.eclipse.papyrus.sasheditor.contentprovider.di.IPageMngr; -import org.eclipse.ui.PlatformUI; -import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; -import org.eclipse.uml2.uml.UMLFactory; - - -/** - * A Handler responsible to create the EObject representing a UmlTools class diagram. - * The handler also add the created EObject to the SashContainerProvider. In reaction, the SashEditor - * will instanciate the corresponding Editor. - * - * @author cedric dumoulin - * - */ -public class CreateClassDiagramHandler extends AbstractHandler implements IHandler { - - /** - * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) - * - * @param event - * @return - * @throws ExecutionException - */ - - public Object execute(ExecutionEvent event) throws ExecutionException { - - // Choose one of the two execution mode. - executeAsTransaction(event); -// doExecute(event); - // Return null, as required by the API - return null; - } - - /** - * Execute the handler in a undoable transaction. - * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) - * - * @param event - * @return - * @throws ExecutionException - */ - - public void executeAsTransaction(final ExecutionEvent event) throws ExecutionException { - - TransactionalEditingDomain editingDomain = EditorUtils.getTransactionalEditingDomain(); - - // Create a transactional command. - AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain,"Create Class Diagram", Collections.EMPTY_LIST) { - - @Override - protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) - throws ExecutionException { - - CommandResult commandResult; - try { - // Call the real implementation - CreateClassDiagramHandler.this.doExecute(event); - commandResult = CommandResult.newOKCommandResult(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - commandResult = CommandResult.newErrorCommandResult("Error during diagram creation"); - } - return commandResult; - } - }; - - // Execute the command - try { - OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null); - } catch (ExecutionException e) { - e.printStackTrace(); - // TODO log the error - } - } - - /** - * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) - * - * @param event - * @return - * @throws ExecutionException - */ - - public void doExecute(ExecutionEvent event) throws ExecutionException { - - // First, create the EObject used to represent the Editor. - // This is generally the root object used to instantiate the corresponding editor. - EObject editorRootObject = createEditorRootObject(); - // Then add the root object to the SashContainerProvider - IPageMngr pageMngr = EditorUtils.getIPageMngr(); - pageMngr.openPage(editorRootObject); - } - - /** - * Create the root object used to find the type of the editor to create, and provided to the new instance. - * - * @return - */ - private EObject createEditorRootObject() { - - String diagramName = "newDiagram"; - EObject associatedDomainRoot = getDomainRoot(); - Resource diagramResource = getDiagramResource(); - - Diagram diagram = ViewService.createDiagram(associatedDomainRoot, getDiagramNotationID(), getPreferenceHint()); - if(diagram != null) { - diagram.setName(diagramName); - // TODO : required ?? - diagram.setElement(associatedDomainRoot); - diagramResource.getContents().add(diagram); -// initializeModel(owner); -// initializeDiagram(diagram); - } - - - return diagram; - } - - /** - * Get the domain element that will be associated to the Diagram. - * chack if the selected element can be used as domain element. - * If nothing is found, create a domain element. - * @return The domain element that will be associated to the diagram. - * - */ - private EObject getDomainRoot() { - - EObject domainElement = getSelectedDomainElement(); - if( domainElement != null) - return domainElement; - - // Create one - return createDomainElement(); - } - - /** - * Create the domain element that will be associated to the Diagram. - * @return - */ - protected EObject createDomainElement() { - return UMLFactory.eINSTANCE.createModel(); - - } - - /** - * Get the domain element associated to the current selection. - * @return The domain EObject associated to the current Eclipse selection, or null. - */ - private EObject getSelectedDomainElement() { - EObject eObject = null; - Object selection = getCurrentSelection(); - if(selection != null) { - Object businessObject = getDomainModel(selection); - if(businessObject instanceof EObject) { - eObject = (EObject)businessObject; - } - } - return eObject; - } - - /** - * Get current selection first element. - * - * @return the selected element or null. - */ - private Object getCurrentSelection() { - ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); - if(selection instanceof IStructuredSelection) { - IStructuredSelection structuredSelection = (IStructuredSelection)selection; - return structuredSelection.getFirstElement(); - } - - return null; - } - - /** - * Get the domain object associated to the provided object, if any. - * The provided object is a graphical artifact (EditPart, View, ...) - * This method navigate throw the object if the object is a graphical artifact or a - * diagram artifact. - * - * @param object Graphical artifact associated to a domain object. - * @return Object The domain object associated to the graphical artifact. - */ - private Object getDomainModel(Object object) { - if(object instanceof EditPart) { - // Check model. It can be a GraphNode. - Object model = ((EditPart)object).getModel(); - // Check if it is a notation View - if(model instanceof View) { - return ((View)model).getElement(); - - } else - return model; - - } - else if(object instanceof View) { - return ((View)object).getElement(); - } - else - return object; - - } - - - /** - * Get the resource containing notation.Diagram. - * @return - */ - private Resource getDiagramResource() { - return EditorUtils.getDiResourceSet().getNotationResource(); - } - - /** - * Get the ID identifying the type of the Diagram. - * {@inheritDoc} - */ - protected String getDiagramNotationID() { - return org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart.MODEL_ID; - } - - /** - * {@inheritDoc} - */ - protected PreferencesHint getPreferenceHint() { - return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; - } - -} diff --git a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java b/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java deleted file mode 100644 index 36c7a2a6d99..00000000000 --- a/extraplugins/umltools/org.eclipse.papyrus.diagram.umltools.clazz/src/org/eclipse/papyrus/diagram/umltools/clazz/UmlClassDiagramForMultiEditor.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * - */ -package org.eclipse.papyrus.diagram.umltools.clazz; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.emf.common.ui.URIEditorInput; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gef.GraphicalViewer; -import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider; -import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.l10n.EditorMessages; -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.papyrus.core.adaptor.gmf.GmfMultiDiagramDocumentProvider; -import org.eclipse.papyrus.core.editor.BackboneException; -import org.eclipse.papyrus.core.services.ServiceException; -import org.eclipse.papyrus.core.services.ServicesRegistry; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.PartInitException; -import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditor; - -/** - * An editor to be used in multitabs editor. This editor extends the original UML Activity Diagram. - * - * @author dumoulin - * - */ -public class UmlClassDiagramForMultiEditor extends UMLDiagramEditor { - - /** - * The diagram shown by this editor. - */ - private Diagram diagram; - - /** - * - */ - private ServicesRegistry servicesRegistry; - - /** - * Constructor for SashSystem v2. Context and required objects are retrieved from the - * ServiceRegistry. - * - * @throws BackboneException - * @throws ServiceException - * - */ - public UmlClassDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException { - this.servicesRegistry = servicesRegistry; - this.diagram = diagram; - - // Share the same editing provider - TransactionalEditingDomain editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class); - GmfMultiDiagramDocumentProvider documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain); - - // overrides editing domain created by super constructor - setDocumentProvider(documentProvider); - - } - - /** - * @return the diagram - */ - public Diagram getDiagram() { - return diagram; - } - - /** - * @param diagram - * the diagram to set - */ - public void setDiagram(Diagram diagram) { - this.diagram = diagram; - } - - /** - * Change visibility to public. - */ - @Override - public GraphicalViewer getGraphicalViewer() { - return super.getGraphicalViewer(); - } - - /** - * - */ - final protected IDocumentProvider getDocumentProvider(IEditorInput input) { - // System.out.println("getDocumentProvider(IEditorInput input)"); - if (input instanceof IFileEditorInput || input instanceof URIEditorInput) { - throw new UnsupportedOperationException("TODO !!!"); - } - return super.getDocumentProvider(input); - } - - /** - * @generated - */ - protected void setDocumentProvider(IEditorInput input) { - // Already set in the constructor. - } - - /** - * - */ - @Override - public void init(IEditorSite site, IEditorInput input) throws PartInitException { - super.init(site, input); - // Set name after calling super.init() - setPartName(getDiagram().getName()); - } - - /** - * - */ - @Override - public void setInput(IEditorInput input) { - try { - // We are in a nested editor. - // Provide an URI with fragment in order to reuse the same Resource and to - // set the diagram to the fragment. - // First, compute the URI - URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(diagram)); - System.err.println(this.getClass().getSimpleName() + ".setInput(" + uriInput.toString() + ")"); - doSetInput(uriInput, true); - } catch (CoreException x) { - String title = EditorMessages.Editor_error_setinput_title; - String msg = EditorMessages.Editor_error_setinput_message; - Shell shell = getSite().getShell(); - ErrorDialog.openError(shell, title, msg, x.getStatus()); - } - - } - - Composite splitter; - - @Override - protected void createGraphicalViewer(Composite parent) { - System.out.println("store Composite " + parent); - splitter = parent; - super.createGraphicalViewer(parent); - } - - @Override - public void setFocus() { - - // System.out.println("setFocus( " + ((Object)splitter).hashCode() + "):" + splitter.getChildren()); - splitter.setFocus(); - - super.setFocus(); - } - - public String getEditingDomainID() { - return "org.eclipse.uml2.diagram.clazz.EditingDomain"; - } - -} -- cgit v1.2.3 From 060a85b6c7afda80ccd6c983d828a6eea252c653 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:40:28 +0100 Subject: [Releng] Move the adaptor.modisco plug-in to the deprecated folder --- .../org.eclipse.papyrus.adaptor.modisco/.classpath | 7 + .../org.eclipse.papyrus.adaptor.modisco/.project | 28 +++ .../META-INF/MANIFEST.MF | 13 ++ .../build.properties | 5 + .../icons/full/logoMoDiscoMini.gif | Bin 0 -> 1078 bytes .../org.eclipse.papyrus.adaptor.modisco/plugin.xml | 61 +++++++ .../papyrus/adapters/modisco/Activator.java | 50 ++++++ .../modisco/CreateModiscoBrowserHandler.java | 32 ++++ .../adapters/modisco/ModiscoBrowserEditor.java | 123 +++++++++++++ .../modisco/ModiscoBrowserEditorFactory.java | 197 +++++++++++++++++++++ .../org.eclipse.papyrus.adaptor.modisco/.classpath | 7 - .../org.eclipse.papyrus.adaptor.modisco/.project | 28 --- .../META-INF/MANIFEST.MF | 13 -- .../build.properties | 5 - .../icons/full/logoMoDiscoMini.gif | Bin 1078 -> 0 bytes .../org.eclipse.papyrus.adaptor.modisco/plugin.xml | 61 ------- .../papyrus/adapters/modisco/Activator.java | 50 ------ .../modisco/CreateModiscoBrowserHandler.java | 32 ---- .../adapters/modisco/ModiscoBrowserEditor.java | 123 ------------- .../modisco/ModiscoBrowserEditorFactory.java | 197 --------------------- 20 files changed, 516 insertions(+), 516 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/.project create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java create mode 100644 deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.classpath delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.project delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/build.properties delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/plugin.xml delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java delete mode 100644 extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath b/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/.project b/deprecated/org.eclipse.papyrus.adaptor.modisco/.project new file mode 100644 index 00000000000..12cd199fb89 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.adaptor.modisco + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..2b559853ded --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Modisco +Bundle-SymbolicName: org.eclipse.papyrus.adaptor.modisco;singleton:=true +Bundle-Version: 0.7.0.qualifier +Bundle-Activator: org.eclipse.papyrus.adapters.modisco.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.papyrus.core;bundle-version="0.7.0", + org.eclipse.gmt.modisco.infra.browser;bundle-version="0.8.1", + org.eclipse.papyrus.core.adaptor.emf;bundle-version="0.7.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties b/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties new file mode 100644 index 00000000000..6f20375d6c7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif b/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif new file mode 100644 index 00000000000..19c468b1c61 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif differ diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml b/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml new file mode 100644 index 00000000000..d7529c833c3 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/plugin.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java new file mode 100644 index 00000000000..77dee147dc0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java @@ -0,0 +1,50 @@ +package org.eclipse.papyrus.adapters.modisco; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.adapters.modisco"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java new file mode 100644 index 00000000000..8c7d7b56a3f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java @@ -0,0 +1,32 @@ +/***************************************************************************** + * Copyright (c) 2008 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.adapters.modisco; + +import org.eclipse.papyrus.core.adaptor.emf.CreateDiagramHandler; + +/** + * Eclipse handler to create a Modisco Browser Editor. + * @todo Let it extends a class that is not emf related. + * + * @author cedric dumoulin + * + */ +public class CreateModiscoBrowserHandler extends CreateDiagramHandler { + + @Override + protected void addNewDiagram() { + addNewDiagram("Modisco Browser", ModiscoBrowserEditorFactory.MODISCO_EDITOR_TYPE, null); + } + +} diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java new file mode 100644 index 00000000000..2cc203c331d --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java @@ -0,0 +1,123 @@ +/** + * + */ +package org.eclipse.papyrus.adapters.modisco; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.NotificationFilter; +import org.eclipse.emf.transaction.ResourceSetChangeEvent; +import org.eclipse.emf.transaction.ResourceSetListener; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser; +import org.eclipse.papyrus.core.editor.BackboneException; +import org.eclipse.papyrus.core.services.ServiceException; +import org.eclipse.papyrus.core.services.ServicesRegistry; +import org.eclipse.papyrus.core.utils.DiResourceSet; +import org.eclipse.ui.IEditorPart; + + +/** + * @author dumoulin + * + */ +public class ModiscoBrowserEditor extends EcoreBrowser { + + /** + * ResourceSet shared by Papyrus. + */ + private ResourceSet resourceSet; + + private Resource modelResource; + + private ServicesRegistry servicesRegistry; + + /** + * Listen to model changes + */ + private final ResourceSetListener resourceSetListener = new ResourceSetListener() { + + public NotificationFilter getFilter() { + return null; + } + + public boolean isAggregatePrecommitListener() { + return false; + } + + public boolean isPostcommitOnly() { + return true; + } + + public boolean isPrecommitOnly() { + return false; + } + + public void resourceSetChanged(ResourceSetChangeEvent event) { + if(event.getTransaction() != null && event.getTransaction().getStatus().isOK()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + + public void run() { + reloadModel(); + } + }); + } + } + + public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { + return null; + } + + }; + + + /** + * Constructor. + * @param servicesRegistry Service Registry used to retrieve service needed by this editor. + * + */ + public ModiscoBrowserEditor(ServicesRegistry servicesRegistry) throws ServiceException, BackboneException { + + + this.servicesRegistry = servicesRegistry; + + // Share the same editing provider + TransactionalEditingDomain editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class); + + this.resourceSet = editingDomain.getResourceSet(); + + // Get the model + DiResourceSet resourceMngr = servicesRegistry.getService(DiResourceSet.class); + modelResource = resourceMngr.getModelResource(); + + // Let's listen to the resource set change + editingDomain.addResourceSetListener(resourceSetListener); + + } + + /** + * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createModel() + * + * @return + */ + @Override + protected Resource createModel() { + +// return super.createModel(); + return modelResource; + } + + /** + * + * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createResourceSet() + * + */ + @Override + protected ResourceSet createResourceSet() { + return resourceSet; + } + + +} diff --git a/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java new file mode 100644 index 00000000000..4e8aebe7ea9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java @@ -0,0 +1,197 @@ +/***************************************************************************** + * Copyright (c) 2008 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.adapters.modisco; + +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.papyrus.core.editor.BackboneException; +import org.eclipse.papyrus.core.extension.diagrameditor.AbstractEditorFactory; +import org.eclipse.papyrus.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry; +import org.eclipse.papyrus.core.services.ServiceException; +import org.eclipse.papyrus.core.services.ServicesRegistry; +import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel; +import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.EditorActionBarContributor; + +/** + * @author cedric dumoulin + * + */ +public class ModiscoBrowserEditorFactory extends AbstractEditorFactory { + + /** name of the emf diagram in Di2 type diagram + * TODO Use something else than a Diagram to mark the editor. Add a class in sashdi. + */ + public static final String MODISCO_EDITOR_TYPE = "modiscoBrowser"; + + /** + * @param diagramClass + * @param expectedType + */ + public ModiscoBrowserEditorFactory() { + // TODO remove next once the unused methods will be removed + super(null, null); + } + + + /** + * TODO Implements next methods + * + * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#createIPageModel(java.lang.Object) + * @param pageIdentifier + * @return + * + */ + public IPageModel createIPageModel(Object pageIdentifier) { + return new ModiscoBrowserPageModel((Diagram)pageIdentifier, getServiceRegistry()); + } + + /** + * + * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#isPageModelFactoryFor(java.lang.Object) + * @param pageIdentifier + * @return + * + */ + public boolean isPageModelFactoryFor(Object pageIdentifier) { + if(pageIdentifier instanceof Diagram) { + Diagram diagram = (Diagram)pageIdentifier; + + if(MODISCO_EDITOR_TYPE.equals(diagram.getType())) { + return true; + } + } + // no + return false; + } + + + /** + * Inner class. + * A model representing the modisco browser in the sasheditor provider. + * @author dumoulin + * + */ + public class ModiscoBrowserPageModel implements IEditorModel { + + /** + * The object used as page identifier and rawModel. + */ + private Diagram pageIdentifier; + + private ServicesRegistry servicesRegistry; + + /** + * + * Constructor. + * + * @param pageIdentifier + * @param servicesRegistry + */ + public ModiscoBrowserPageModel(Diagram pageIdentifier, ServicesRegistry servicesRegistry) { + this.pageIdentifier = pageIdentifier; + this.servicesRegistry = servicesRegistry; + } + + /** + * Create the instance of the editor. + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#createIEditorPart() + * @return + * @throws PartInitException + * + */ + public IEditorPart createIEditorPart() throws PartInitException { + try { + return new ModiscoBrowserEditor(servicesRegistry); + } catch (ServiceException e) { + throw new PartInitException("Can't create ModiscoEditor.", e); + } catch (BackboneException e) { + throw new PartInitException("Can't create ModiscoEditor.", e); + } + } + + public EditorActionBarContributor getActionBarContributor() { + + String actionBarId = editorDescriptor.getActionBarContributorId(); + + // Do nothing if no EditorActionBarContributor is specify. + if(actionBarId == null || actionBarId.length() == 0) { + return null; + } + + // Try to get it. + + // Get ServiceRegistry + ActionBarContributorRegistry registry; + try { + registry = (ActionBarContributorRegistry)servicesRegistry + .getService(ActionBarContributorRegistry.class); + } catch (ServiceException e) { + // Service not found + // TODO Log the error + e.printStackTrace(); + return null; + } + + try { + return registry.getActionBarContributor(actionBarId); + } catch (BackboneException e) { + // TODO Log the error and throw an exception instead + e.printStackTrace(); + return null; + } + } + + /** + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getRawModel() + * @return + * + */ + public Object getRawModel() { + return pageIdentifier; + } + + /** + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabIcon() + * @return + * + */ + public Image getTabIcon() { + ImageDescriptor imageDescriptor = editorDescriptor.getIcon(); + if(imageDescriptor == null) + return null; + + return imageDescriptor.createImage(); + } + + /** + * + * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabTitle() + * @return + * + */ + public String getTabTitle() { + return "Modisco"; + } + + + } +} diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.classpath b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.project b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.project deleted file mode 100644 index 12cd199fb89..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.adaptor.modisco - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF deleted file mode 100644 index 2b559853ded..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Modisco -Bundle-SymbolicName: org.eclipse.papyrus.adaptor.modisco;singleton:=true -Bundle-Version: 0.7.0.qualifier -Bundle-Activator: org.eclipse.papyrus.adapters.modisco.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.papyrus.core;bundle-version="0.7.0", - org.eclipse.gmt.modisco.infra.browser;bundle-version="0.8.1", - org.eclipse.papyrus.core.adaptor.emf;bundle-version="0.7.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/build.properties b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/build.properties deleted file mode 100644 index 6f20375d6c7..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif deleted file mode 100644 index 19c468b1c61..00000000000 Binary files a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/icons/full/logoMoDiscoMini.gif and /dev/null differ diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/plugin.xml b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/plugin.xml deleted file mode 100644 index d7529c833c3..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/plugin.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java deleted file mode 100644 index 77dee147dc0..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.papyrus.adapters.modisco; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.adapters.modisco"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java deleted file mode 100644 index 8c7d7b56a3f..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/CreateModiscoBrowserHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.adapters.modisco; - -import org.eclipse.papyrus.core.adaptor.emf.CreateDiagramHandler; - -/** - * Eclipse handler to create a Modisco Browser Editor. - * @todo Let it extends a class that is not emf related. - * - * @author cedric dumoulin - * - */ -public class CreateModiscoBrowserHandler extends CreateDiagramHandler { - - @Override - protected void addNewDiagram() { - addNewDiagram("Modisco Browser", ModiscoBrowserEditorFactory.MODISCO_EDITOR_TYPE, null); - } - -} diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java deleted file mode 100644 index 2cc203c331d..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditor.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * - */ -package org.eclipse.papyrus.adapters.modisco; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.transaction.NotificationFilter; -import org.eclipse.emf.transaction.ResourceSetChangeEvent; -import org.eclipse.emf.transaction.ResourceSetListener; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser; -import org.eclipse.papyrus.core.editor.BackboneException; -import org.eclipse.papyrus.core.services.ServiceException; -import org.eclipse.papyrus.core.services.ServicesRegistry; -import org.eclipse.papyrus.core.utils.DiResourceSet; -import org.eclipse.ui.IEditorPart; - - -/** - * @author dumoulin - * - */ -public class ModiscoBrowserEditor extends EcoreBrowser { - - /** - * ResourceSet shared by Papyrus. - */ - private ResourceSet resourceSet; - - private Resource modelResource; - - private ServicesRegistry servicesRegistry; - - /** - * Listen to model changes - */ - private final ResourceSetListener resourceSetListener = new ResourceSetListener() { - - public NotificationFilter getFilter() { - return null; - } - - public boolean isAggregatePrecommitListener() { - return false; - } - - public boolean isPostcommitOnly() { - return true; - } - - public boolean isPrecommitOnly() { - return false; - } - - public void resourceSetChanged(ResourceSetChangeEvent event) { - if(event.getTransaction() != null && event.getTransaction().getStatus().isOK()) { - getSite().getShell().getDisplay().asyncExec(new Runnable() { - - public void run() { - reloadModel(); - } - }); - } - } - - public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { - return null; - } - - }; - - - /** - * Constructor. - * @param servicesRegistry Service Registry used to retrieve service needed by this editor. - * - */ - public ModiscoBrowserEditor(ServicesRegistry servicesRegistry) throws ServiceException, BackboneException { - - - this.servicesRegistry = servicesRegistry; - - // Share the same editing provider - TransactionalEditingDomain editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class); - - this.resourceSet = editingDomain.getResourceSet(); - - // Get the model - DiResourceSet resourceMngr = servicesRegistry.getService(DiResourceSet.class); - modelResource = resourceMngr.getModelResource(); - - // Let's listen to the resource set change - editingDomain.addResourceSetListener(resourceSetListener); - - } - - /** - * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createModel() - * - * @return - */ - @Override - protected Resource createModel() { - -// return super.createModel(); - return modelResource; - } - - /** - * - * @see org.eclipse.gmt.modisco.infra.browser.editors.EcoreBrowser#createResourceSet() - * - */ - @Override - protected ResourceSet createResourceSet() { - return resourceSet; - } - - -} diff --git a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java b/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java deleted file mode 100644 index 4e8aebe7ea9..00000000000 --- a/extraplugins/modisco/org.eclipse.papyrus.adaptor.modisco/src/org/eclipse/papyrus/adapters/modisco/ModiscoBrowserEditorFactory.java +++ /dev/null @@ -1,197 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2008 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.adapters.modisco; - -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.papyrus.core.editor.BackboneException; -import org.eclipse.papyrus.core.extension.diagrameditor.AbstractEditorFactory; -import org.eclipse.papyrus.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry; -import org.eclipse.papyrus.core.services.ServiceException; -import org.eclipse.papyrus.core.services.ServicesRegistry; -import org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel; -import org.eclipse.papyrus.sasheditor.contentprovider.IPageModel; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.EditorActionBarContributor; - -/** - * @author cedric dumoulin - * - */ -public class ModiscoBrowserEditorFactory extends AbstractEditorFactory { - - /** name of the emf diagram in Di2 type diagram - * TODO Use something else than a Diagram to mark the editor. Add a class in sashdi. - */ - public static final String MODISCO_EDITOR_TYPE = "modiscoBrowser"; - - /** - * @param diagramClass - * @param expectedType - */ - public ModiscoBrowserEditorFactory() { - // TODO remove next once the unused methods will be removed - super(null, null); - } - - - /** - * TODO Implements next methods - * - * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#createIPageModel(java.lang.Object) - * @param pageIdentifier - * @return - * - */ - public IPageModel createIPageModel(Object pageIdentifier) { - return new ModiscoBrowserPageModel((Diagram)pageIdentifier, getServiceRegistry()); - } - - /** - * - * @see org.eclipse.papyrus.core.extension.diagrameditor.IPluggableEditorFactory#isPageModelFactoryFor(java.lang.Object) - * @param pageIdentifier - * @return - * - */ - public boolean isPageModelFactoryFor(Object pageIdentifier) { - if(pageIdentifier instanceof Diagram) { - Diagram diagram = (Diagram)pageIdentifier; - - if(MODISCO_EDITOR_TYPE.equals(diagram.getType())) { - return true; - } - } - // no - return false; - } - - - /** - * Inner class. - * A model representing the modisco browser in the sasheditor provider. - * @author dumoulin - * - */ - public class ModiscoBrowserPageModel implements IEditorModel { - - /** - * The object used as page identifier and rawModel. - */ - private Diagram pageIdentifier; - - private ServicesRegistry servicesRegistry; - - /** - * - * Constructor. - * - * @param pageIdentifier - * @param servicesRegistry - */ - public ModiscoBrowserPageModel(Diagram pageIdentifier, ServicesRegistry servicesRegistry) { - this.pageIdentifier = pageIdentifier; - this.servicesRegistry = servicesRegistry; - } - - /** - * Create the instance of the editor. - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IEditorModel#createIEditorPart() - * @return - * @throws PartInitException - * - */ - public IEditorPart createIEditorPart() throws PartInitException { - try { - return new ModiscoBrowserEditor(servicesRegistry); - } catch (ServiceException e) { - throw new PartInitException("Can't create ModiscoEditor.", e); - } catch (BackboneException e) { - throw new PartInitException("Can't create ModiscoEditor.", e); - } - } - - public EditorActionBarContributor getActionBarContributor() { - - String actionBarId = editorDescriptor.getActionBarContributorId(); - - // Do nothing if no EditorActionBarContributor is specify. - if(actionBarId == null || actionBarId.length() == 0) { - return null; - } - - // Try to get it. - - // Get ServiceRegistry - ActionBarContributorRegistry registry; - try { - registry = (ActionBarContributorRegistry)servicesRegistry - .getService(ActionBarContributorRegistry.class); - } catch (ServiceException e) { - // Service not found - // TODO Log the error - e.printStackTrace(); - return null; - } - - try { - return registry.getActionBarContributor(actionBarId); - } catch (BackboneException e) { - // TODO Log the error and throw an exception instead - e.printStackTrace(); - return null; - } - } - - /** - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getRawModel() - * @return - * - */ - public Object getRawModel() { - return pageIdentifier; - } - - /** - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabIcon() - * @return - * - */ - public Image getTabIcon() { - ImageDescriptor imageDescriptor = editorDescriptor.getIcon(); - if(imageDescriptor == null) - return null; - - return imageDescriptor.createImage(); - } - - /** - * - * @see org.eclipse.papyrus.sasheditor.contentprovider.IPageModel#getTabTitle() - * @return - * - */ - public String getTabTitle() { - return "Modisco"; - } - - - } -} -- cgit v1.2.3 From 5efb25129cdd8ecbb235b7ab8fb9df7772f366a3 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 19:41:48 +0100 Subject: [Releng] Move the oep.diagramqueryresult plug-in to the deprecated folder --- .../.classpath | 7 ++ .../.project | 28 +++++ .../.settings/org.eclipse.jdt.core.prefs | 8 ++ .../META-INF/MANIFEST.MF | 20 ++++ .../build.properties | 5 + .../plugin.properties | 16 +++ .../plugin.xml | 12 +++ .../papyrus/diagramqueryresult/Activator.java | 63 +++++++++++ .../DiagramQueryResultDisplayer.java | 119 +++++++++++++++++++++ .../.classpath | 7 -- .../.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 8 -- .../META-INF/MANIFEST.MF | 20 ---- .../build.properties | 5 - .../plugin.properties | 16 --- .../plugin.xml | 12 --- .../papyrus/diagramqueryresult/Activator.java | 63 ----------- .../DiagramQueryResultDisplayer.java | 119 --------------------- 18 files changed, 278 insertions(+), 278 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/.classpath create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/.project create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/build.properties create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/.classpath delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/.project delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/build.properties delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.properties delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.xml delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java delete mode 100644 extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java (limited to 'extraplugins') diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/.classpath b/deprecated/org.eclipse.papyrus.diagramqueryresult/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/.project b/deprecated/org.eclipse.papyrus.diagramqueryresult/.project new file mode 100644 index 00000000000..f2ccb673650 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.diagramqueryresult + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..5f279a814d0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Tue May 25 14:26:52 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..f39e39761a7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.diagramqueryresult;singleton:=true +Bundle-Version: 0.7.0 +Bundle-Activator: org.eclipse.papyrus.diagramqueryresult.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.uml2.uml;bundle-version="3.1.0", + org.eclipse.papyrus.core;bundle-version="0.7.0", + org.eclipse.papyrus.editor;bundle-version="0.7.0", + org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.7.0", + org.eclipse.gmt.modisco.infra.query.ui;bundle-version="0.8.0", + org.eclipse.gmt.modisco.infra.query;bundle-version="0.8.0", + org.eclipse.papyrus.diagram.clazz;bundle-version="0.7.0", + org.eclipse.papyrus.diagram.common;bundle-version="0.7.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Vendor: %providerName diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/build.properties b/deprecated/org.eclipse.papyrus.diagramqueryresult/build.properties new file mode 100644 index 00000000000..6f20375d6c7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.properties b/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.properties new file mode 100644 index 00000000000..d0bf9665000 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.properties @@ -0,0 +1,16 @@ +########################################################################################## +# Copyright (c) 2010 CEA LIST. +# +# +# 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation +# +######################################################################################## +providerName=Eclipse.org +pluginName= org.eclipse.papyrus.diagramqueryresult (Incubation) + diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.xml b/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.xml new file mode 100644 index 00000000000..48397355a76 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/plugin.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java b/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java new file mode 100644 index 00000000000..2b689b6d427 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java @@ -0,0 +1,63 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.diagramqueryresult; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.diagramqueryresult"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java b/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java new file mode 100644 index 00000000000..1a7ebb55819 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.diagramqueryresult; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.CompoundCommand; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds; +import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; +import org.eclipse.gmf.runtime.diagram.ui.requests.ArrangeRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; +import org.eclipse.gmf.runtime.diagram.ui.services.layout.LayoutType; +import org.eclipse.gmt.modisco.infra.query.runtime.ModelQueryResult; +import org.eclipse.gmt.modisco.infra.query.ui.views.queryExecution.QueryResultDisplayer; +import org.eclipse.papyrus.core.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.core.extension.commands.ICreationCommand; +import org.eclipse.papyrus.core.utils.DiResourceSet; +import org.eclipse.papyrus.core.utils.EditorUtils; +import org.eclipse.papyrus.diagram.clazz.CreateClassDiagramCommand; +import org.eclipse.papyrus.diagram.clazz.UmlClassDiagramForMultiEditor; +import org.eclipse.papyrus.diagram.clazz.part.UMLDiagramEditor; +import org.eclipse.papyrus.diagram.common.command.wrappers.GEFtoEMFCommandWrapper; +import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Element; + + +public class DiagramQueryResultDisplayer implements QueryResultDisplayer { + + /** The diagram editor. */ + protected UMLDiagramEditor diagramEditor=null; + + /** The clazzdiagramedit part. */ + protected DiagramEditPart clazzdiagrameditPart; + + + + /** The papyrus editor. */ + protected PapyrusMultiDiagramEditor papyrusEditor; + + public DiagramQueryResultDisplayer() { + // TODO Auto-generated constructor stub + } + + public void displayQueryResult(List result) { + while( !(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()instanceof IMultiDiagramEditor)){} + IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); + DiResourceSet diResourceSet=EditorUtils.getDiResourceSet(); + papyrusEditor=((PapyrusMultiDiagramEditor)editorPart); + CreateClassDiagramCommand command= new CreateClassDiagramCommand(); + command.createDiagram(diResourceSet, null, "result"); + + Iterator resultIterator= result.iterator(); + while(resultIterator.hasNext()) { + ModelQueryResult modelQueryResult = (ModelQueryResult)resultIterator.next(); + + if(modelQueryResult.getValue() instanceof Collection){ + Iterator iter= ((Collection)modelQueryResult.getValue()).iterator(); + int i=0; + while(iter.hasNext()) { + Object object = (Object)iter.next(); + + if( object instanceof Element){ + DropObjectsRequest dropObjectsRequest= new DropObjectsRequest(); + ArrayList list = new ArrayList(); + list.add((Element)object); + dropObjectsRequest.setObjects(list); + dropObjectsRequest.setLocation(new Point(20,100*i)); + Command commandDrop= getDiagramEditPart().getCommand(dropObjectsRequest); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDrop); + i++; + } + } + } + } + List operationSet = getDiagramEditPart().getChildren(); + ArrangeRequest aRequest = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL, LayoutType.DEFAULT); + //aRequest.setType(ActionIds.ACTION_ARRANGE_ALL); + ArrayList toarrange= new ArrayList(); + toarrange.add(getDiagramEditPart()); + aRequest.setPartsToArrange(toarrange); + Command commandArrangeAll = getDiagramEditPart().getCommand(aRequest); + //getDiagramEditPart().getEditingDomain().getCommandStack().execute(new GEFtoEMFCommandWrapper(commandArrangeAll)); + + + + + } + + /** + * Gets the diagram edit part. + * + * @return the diagram edit part + */ + protected DiagramEditPart getDiagramEditPart(){ + diagramEditor= (UmlClassDiagramForMultiEditor)papyrusEditor.getActiveEditor(); + clazzdiagrameditPart = (DiagramEditPart)diagramEditor.getGraphicalViewer().getEditPartRegistry().get(diagramEditor.getDiagram()); + return clazzdiagrameditPart; + } + +} diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.classpath b/extraplugins/org.eclipse.papyrus.diagramqueryresult/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.project b/extraplugins/org.eclipse.papyrus.diagramqueryresult/.project deleted file mode 100644 index f2ccb673650..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.diagramqueryresult - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs b/extraplugins/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5f279a814d0..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Tue May 25 14:26:52 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF b/extraplugins/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF deleted file mode 100644 index f39e39761a7..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/META-INF/MANIFEST.MF +++ /dev/null @@ -1,20 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.papyrus.diagramqueryresult;singleton:=true -Bundle-Version: 0.7.0 -Bundle-Activator: org.eclipse.papyrus.diagramqueryresult.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.uml2.uml;bundle-version="3.1.0", - org.eclipse.papyrus.core;bundle-version="0.7.0", - org.eclipse.papyrus.editor;bundle-version="0.7.0", - org.eclipse.papyrus.core.adaptor.gmf;bundle-version="0.7.0", - org.eclipse.gmt.modisco.infra.query.ui;bundle-version="0.8.0", - org.eclipse.gmt.modisco.infra.query;bundle-version="0.8.0", - org.eclipse.papyrus.diagram.clazz;bundle-version="0.7.0", - org.eclipse.papyrus.diagram.common;bundle-version="0.7.0", - org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Vendor: %providerName diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/build.properties b/extraplugins/org.eclipse.papyrus.diagramqueryresult/build.properties deleted file mode 100644 index 6f20375d6c7..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.properties b/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.properties deleted file mode 100644 index d0bf9665000..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.properties +++ /dev/null @@ -1,16 +0,0 @@ -########################################################################################## -# Copyright (c) 2010 CEA LIST. -# -# -# 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 -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation -# -######################################################################################## -providerName=Eclipse.org -pluginName= org.eclipse.papyrus.diagramqueryresult (Incubation) - diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.xml b/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.xml deleted file mode 100644 index 48397355a76..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/plugin.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java b/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java deleted file mode 100644 index 2b689b6d427..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/Activator.java +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.diagramqueryresult; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.papyrus.diagramqueryresult"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java b/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java deleted file mode 100644 index 1a7ebb55819..00000000000 --- a/extraplugins/org.eclipse.papyrus.diagramqueryresult/src/org/eclipse/papyrus/diagramqueryresult/DiagramQueryResultDisplayer.java +++ /dev/null @@ -1,119 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2010 CEA LIST. - * - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.diagramqueryresult; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.CompoundCommand; -import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds; -import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; -import org.eclipse.gmf.runtime.diagram.ui.requests.ArrangeRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; -import org.eclipse.gmf.runtime.diagram.ui.services.layout.LayoutType; -import org.eclipse.gmt.modisco.infra.query.runtime.ModelQueryResult; -import org.eclipse.gmt.modisco.infra.query.ui.views.queryExecution.QueryResultDisplayer; -import org.eclipse.papyrus.core.editor.IMultiDiagramEditor; -import org.eclipse.papyrus.core.extension.commands.ICreationCommand; -import org.eclipse.papyrus.core.utils.DiResourceSet; -import org.eclipse.papyrus.core.utils.EditorUtils; -import org.eclipse.papyrus.diagram.clazz.CreateClassDiagramCommand; -import org.eclipse.papyrus.diagram.clazz.UmlClassDiagramForMultiEditor; -import org.eclipse.papyrus.diagram.clazz.part.UMLDiagramEditor; -import org.eclipse.papyrus.diagram.common.command.wrappers.GEFtoEMFCommandWrapper; -import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PlatformUI; -import org.eclipse.uml2.uml.Element; - - -public class DiagramQueryResultDisplayer implements QueryResultDisplayer { - - /** The diagram editor. */ - protected UMLDiagramEditor diagramEditor=null; - - /** The clazzdiagramedit part. */ - protected DiagramEditPart clazzdiagrameditPart; - - - - /** The papyrus editor. */ - protected PapyrusMultiDiagramEditor papyrusEditor; - - public DiagramQueryResultDisplayer() { - // TODO Auto-generated constructor stub - } - - public void displayQueryResult(List result) { - while( !(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()instanceof IMultiDiagramEditor)){} - IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); - DiResourceSet diResourceSet=EditorUtils.getDiResourceSet(); - papyrusEditor=((PapyrusMultiDiagramEditor)editorPart); - CreateClassDiagramCommand command= new CreateClassDiagramCommand(); - command.createDiagram(diResourceSet, null, "result"); - - Iterator resultIterator= result.iterator(); - while(resultIterator.hasNext()) { - ModelQueryResult modelQueryResult = (ModelQueryResult)resultIterator.next(); - - if(modelQueryResult.getValue() instanceof Collection){ - Iterator iter= ((Collection)modelQueryResult.getValue()).iterator(); - int i=0; - while(iter.hasNext()) { - Object object = (Object)iter.next(); - - if( object instanceof Element){ - DropObjectsRequest dropObjectsRequest= new DropObjectsRequest(); - ArrayList list = new ArrayList(); - list.add((Element)object); - dropObjectsRequest.setObjects(list); - dropObjectsRequest.setLocation(new Point(20,100*i)); - Command commandDrop= getDiagramEditPart().getCommand(dropObjectsRequest); - diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDrop); - i++; - } - } - } - } - List operationSet = getDiagramEditPart().getChildren(); - ArrangeRequest aRequest = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL, LayoutType.DEFAULT); - //aRequest.setType(ActionIds.ACTION_ARRANGE_ALL); - ArrayList toarrange= new ArrayList(); - toarrange.add(getDiagramEditPart()); - aRequest.setPartsToArrange(toarrange); - Command commandArrangeAll = getDiagramEditPart().getCommand(aRequest); - //getDiagramEditPart().getEditingDomain().getCommandStack().execute(new GEFtoEMFCommandWrapper(commandArrangeAll)); - - - - - } - - /** - * Gets the diagram edit part. - * - * @return the diagram edit part - */ - protected DiagramEditPart getDiagramEditPart(){ - diagramEditor= (UmlClassDiagramForMultiEditor)papyrusEditor.getActiveEditor(); - clazzdiagrameditPart = (DiagramEditPart)diagramEditor.getGraphicalViewer().getEditPartRegistry().get(diagramEditor.getDiagram()); - return clazzdiagrameditPart; - } - -} -- cgit v1.2.3