Skip to content

Commit

Permalink
Add qualifier to version and add menu contribution to launch verifica…
Browse files Browse the repository at this point in the history
…tion on model open in active editor.
  • Loading branch information
franco-maroni committed Sep 9, 2016
1 parent 74cdbbc commit 4eb128b
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 33 deletions.
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.core.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DICE Core UI
Bundle-SymbolicName: it.polimi.dice.core.ui;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: it.polimi.dice.core.ui.DiceCoreUiPlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.core.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Dice Core Plugin
Bundle-SymbolicName: it.polimi.dice.core;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: it.polimi.dice.core.DiceCorePlugin
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
6 changes: 3 additions & 3 deletions plugin/it.polimi.dice.update/category.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/it.polimi.dice.verification.feature_0.1.0.jar" id="it.polimi.dice.verification.feature" version="0.1.0">
<feature url="features/it.polimi.dice.verification.feature_0.1.0.qualifier.jar" id="it.polimi.dice.verification.feature" version="0.1.0.qualifier">
<category name="it.polimi.dice.verification"/>
</feature>
<feature url="features/it.polimi.dice.verification.ui.feature_0.1.0.jar" id="it.polimi.dice.verification.ui.feature" version="0.1.0">
<feature url="features/it.polimi.dice.verification.ui.feature_0.1.0.qualifier.jar" id="it.polimi.dice.verification.ui.feature" version="0.1.0.qualifier">
<category name="it.polimi.dice.verification"/>
</feature>
<feature url="features/it.polimi.dice.verification.uml2json.feature_0.1.0.jar" id="it.polimi.dice.verification.uml2json.feature" version="0.1.0">
<feature url="features/it.polimi.dice.verification.uml2json.feature_0.1.0.qualifier.jar" id="it.polimi.dice.verification.uml2json.feature" version="0.1.0.qualifier">
<category name="it.polimi.dice.verification"/>
</feature>
<category-def name="it.polimi.dice.verification" label="DICE Verification by Polimi"/>
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
</project>
4 changes: 2 additions & 2 deletions plugin/it.polimi.dice.verification.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="it.polimi.dice.verification.feature"
label="DICE Verification"
version="0.1.0">
version="0.1.0.qualifier">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
Expand All @@ -20,7 +20,7 @@
id="it.polimi.dice.verification"
download-size="0"
install-size="0"
version="0.1.0"
version="0.1.0.qualifier"
unpack="false"/>

<plugin
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
4 changes: 2 additions & 2 deletions plugin/it.polimi.dice.verification.ui.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="it.polimi.dice.verification.ui.feature"
label="DICE Verification UI"
version="0.1.0">
version="0.1.0.qualifier">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
Expand All @@ -20,7 +20,7 @@
id="it.polimi.dice.verification.ui"
download-size="0"
install-size="0"
version="0.1.0"
version="0.1.0.qualifier"
unpack="false"/>

<plugin
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification.ui.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: DICE Verification UI
Bundle-SymbolicName: it.polimi.dice.verification.ui;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: it.polimi.dice.verification.ui.DiceVerificationUiPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide,
Expand Down
13 changes: 9 additions & 4 deletions plugin/it.polimi.dice.verification.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
<!-- <menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<menu
id="it.polimi.dice.verification.ui.menus.diceVerificationMenu"
Expand All @@ -44,16 +44,21 @@
</visibleWhen>
</command>
</menu>
</menuContribution>
</menuContribution>-->
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar
id="it.polimi.dice.verification.ui.toolbars.sampleToolbar">
<command
commandId="it.polimi.dice.verification.ui.commands.launchVerificationCommand"
icon="icons/sample.gif"
icon="icons/verify_icon.png"
id="it.polimi.dice.verification.ui.toolbars.LaunchVerificationCommand"
tooltip="Say hello world">
tooltip="Launch verification on current Papyrus Model">
<visibleWhen>
<with variable="activeEditorId">
<equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
</with>
</visibleWhen>
</command>
</toolbar>
</menuContribution>
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.ILaunchShortcut;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;

Expand All @@ -29,7 +31,15 @@ public LaunchVerificationHandler() {
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
ILaunchShortcut launchShortcut = new VerificationLaunchShortcut();
launchShortcut.launch(window.getActivePage().getActiveEditor(), ILaunchManager.RUN_MODE);
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
IEditorPart editor = page.getActiveEditor();
if(editor != null)
launchShortcut.launch(editor, ILaunchManager.RUN_MODE);
}
}

return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ public void launch(ISelection selection, String mode) {
@Override
public void launch(IEditorPart editor, String mode) {
IEditorInput input = editor.getEditorInput();
IFile file = (IFile) input.getAdapter(IFile.class);
if (file != null) {
launch(file, mode);
if (input != null){
IFile file = (IFile) input.getAdapter(IFile.class);
if (file != null) {
launch(file, mode);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="it.polimi.dice.verification.uml2json.feature"
label="DICE Uml2Json"
version="0.1.0">
version="0.1.0.qualifier">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Uml2json
Bundle-SymbolicName: it.polimi.dice.verification.uml2json;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: it.polimi.dice.verification.uml2json.Uml2JsonPlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf;bundle-version="2.6.0",
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification.uml2json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public StormTopology(){
this.maxIdleTime = 0.1;
this.minRebootTime = 10;
this.maxRebootTime = 100;
this.initQueues = 5;
this.queueThreshold = 0;
}
/*
"min_reboot_time":10,
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Verification
Bundle-SymbolicName: it.polimi.dice.verification;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: it.polimi.dice.verification.DiceVerificationPlugin
Require-Bundle: org.eclipse.core.runtime,
it.polimi.dice.vtconfig,
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.verification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.vtconfig/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: VtConfig
Bundle-SymbolicName: it.polimi.dice.vtconfig;singleton:=true
Bundle-Version: 0.1.0
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.core.runtime;bundle-version="3.11.1",
Expand Down
2 changes: 1 addition & 1 deletion plugin/it.polimi.dice.vtconfig/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>it.polimi.dice</groupId>
<artifactId>it.polimi.dice.parent</artifactId>
<version>0.1.0</version>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>it.polimi.dice.parent</name>
Expand Down

0 comments on commit 4eb128b

Please sign in to comment.