Skip to content

Commit

Permalink
Merge branch 'development' into maven-project
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoprince authored Jan 9, 2020
2 parents 1cd30e4 + 5a9517e commit a72c78c
Show file tree
Hide file tree
Showing 106 changed files with 3,238 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/openapi"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Visual Paradigm Plugin Development"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Visual Paradigm Plug-in Library"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/gson"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Visual Paradigm Plug-in Dependencies"/>
<classpathentry kind="output" path="classes"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OntoUML-2.0-for-Visual-Paradigm</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
35 changes: 35 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<project name="OntoUML Editor" default="build">
<description>OntoUML Plugin for Visual Paradigm</description>

<property name="src" location="E:\workspaceGit\ontouml-server-vp-plugin\src" />
<property name="build" location="build" />
<property name="classes" location="classes" />
<property name="icons" location="icons" />
<property name="lib" location="lib" />
<property name="pluginxml" location="E:\workspaceGit\ontouml-server-vp-plugin\plugin.xml" />
<property name="openapi" location="E:\OntoUML\Visual Paradigm\Visual Paradigm CE 16.0\lib\openapi.jar" />
<property name="gson" location="E:\workspaceGit\ontouml-server-vp-plugin\lib\gson-2.8.6.jar" />
<property name="vp" location="C:\Users\Victor Viola\AppData\Roaming\VisualParadigm\plugins" />

<target name="build">
<javac srcdir="${src}" destdir="${build}" includeAntRuntime="no">
<classpath>
<pathelement path="${openapi}" />
<pathelement path="${gson}" />
</classpath>
</javac>
<copy todir="${build}/classes">
<fileset dir="${classes}" />
</copy>
<copy todir="${build}/icons">
<fileset dir="${icons}" />
</copy>
<copy todir="${build}/lib">
<fileset dir="${lib}" />
</copy>
<copy file="${pluginxml}" todir="${build}" />
<copy todir="${vp}/${ant.project.name}">
<fileset dir="${build}" />
</copy>
</target>
</project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/icons/experiment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/ontuml-logo-horizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/play-triangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/refresh4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/lib/gson-2.8.6.jar
Binary file not shown.
48 changes: 48 additions & 0 deletions build/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<plugin
id="it.unibz.inf.ontouml.vp"
name="OntoUML Plugin for Visual Paradigm"
description="OntoUML Plugin Visual Paradigm"
provider="University of Bolzano"
class="it.unibz.inf.ontouml.vp.OntoUMLPluginForVP">
<actionSets>
<actionSet id="it.unibz.inf.ontouml.vp.actionset1">
<toolbar
id="it.unibz.inf.ontouml.vp.actionset1.toolbar1"
orientation="north"
index="last"/>
<action
id="it.unibz.inf.ontouml.vp.actions.OpenOntoUMLMenuAction"
actionType="generalAction"
description="Add OntoUML Stereotypes."
style="normal"
tooltip="Add OntoUML Stereotypes."
icon="icons/menu.png"
label="Add OntoUML"
toolbarPath="it.unibz.inf.ontouml.vp.actionset1.toolbar1/#">
<actionController class="it.unibz.inf.ontouml.vp.controllers.ActivateOntoUMLPlugin" />
</action>
<action
id="it.unibz.inf.ontouml.vp.actions.OpenOntoUMLMenuAction2"
actionType="generalAction"
description="Default Stereotypes."
style="normal"
tooltip="Default Stereotypes."
icon="icons/menu.png"
label="Default Stereotypes"
toolbarPath="it.unibz.inf.ontouml.vp.actionset1.toolbar1/#">
<actionController class="it.unibz.inf.ontouml.vp.controllers.ActivateDefaultStereotypes" />
</action>
<action
id="it.unibz.inf.ontouml.vp.actions.OpenOntoUMLMenuAction3"
actionType="generalAction"
description="Validate the OntoUML Model."
style="normal"
tooltip="Validate model"
icon="icons/menu.png"
label="Validate Model"
toolbarPath="it.unibz.inf.ontouml.vp.actionset1.toolbar1/#">
<actionController class="it.unibz.inf.ontouml.vp.controllers.ValidateOntoUMLModel" />
</action>
</actionSet>
</actionSets>
</plugin>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added classes/it/unibz/inf/ontouml/vp/model/Class.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added classes/it/unibz/inf/ontouml/vp/model/Model.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added lib/gson-2.8.6.jar
Binary file not shown.
63 changes: 63 additions & 0 deletions src/it/unibz/inf/ontouml/vp/OntoUMLPlugin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package it.unibz.inf.ontouml.vp;

import com.vp.plugin.ApplicationManager;
import com.vp.plugin.ProjectManager;
import com.vp.plugin.VPPlugin;
import com.vp.plugin.VPPluginInfo;
import com.vp.plugin.model.IModelElement;
import com.vp.plugin.model.IProject;
import com.vp.plugin.model.factory.IModelElementFactory;

/**
*
* Implementation of VPPlugin responsible for configuring OntoUML Plugin's
* behaviour when loading and unload.
*
* @author Victor Viola
* @author Claudenir Fonseca
*
*/
public class OntoUMLPlugin implements VPPlugin {

public static final String PLUGIN_ID = "it.unibz.inf.ontouml.vp";
public static final String PLUGIN_NAME = "OntoUML Plugin";

public static IModelElement[] allModelElements;
public static boolean isPluginActive;

/**
*
* OntoUMLPlugin constructor. Declared to make explicit Open API requirements.
*
*/
public OntoUMLPlugin() {
// The constructor of a VPPlugin MUST NOT have parameters.
}

/**
*
* Called by Visual Paradigm when the plugin is loaded.
*
* @param pluginInfo
*
*/
@Override
public void loaded(VPPluginInfo pluginInfo) {
// TODO Reevaluate the need for the following code
ProjectManager pm = ApplicationManager.instance().getProjectManager();
IProject p = pm.getProject();
OntoUMLPlugin.allModelElements = pm.getSelectableStereotypesForModelType(IModelElementFactory.MODEL_TYPE_CLASS,
p, true);
}

/**
*
* Called by Visual Paradigm when the plugin is unloaded (i.e., Visual Paradigm
* will be exited). This method is not called when the plugin is reloaded.
*
*/
@Override
public void unloaded() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package it.unibz.inf.ontouml.vp.controllers;

import com.vp.plugin.ApplicationManager;
import com.vp.plugin.ViewManager;
import com.vp.plugin.action.VPAction;
import com.vp.plugin.action.VPActionController;

public class ActivateDefaultStereotypes implements VPActionController {

@Override
public void performAction(VPAction action) {

ViewManager vm = ApplicationManager.instance().getViewManager();
vm.showMessage("Action \"" + action.getLabel() + "\" is currently disabled. No stereotypes are being removed.");

// StereotypeUtils.removeAllModelStereotypesButOntoUML(IModelElementFactory.MODEL_TYPE_CLASS);
// StereotypeUtils.removeAllModelStereotypesButOntoUML(IModelElementFactory.MODEL_TYPE_ASSOCIATION);

// TODO This won't help returning to the original set of stereotypes

// StereotypeUtils.setDefaultStereotypes(OntoUMLPluginForVP.allModelElements);
// OntoUMLPluginForVP.isPluginActive = false;

}

@Override
public void update(VPAction action) {
// TODO Auto-generated method stub

}

}
30 changes: 30 additions & 0 deletions src/it/unibz/inf/ontouml/vp/controllers/ActivateOntoUMLPlugin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package it.unibz.inf.ontouml.vp.controllers;

import com.vp.plugin.action.VPAction;
import com.vp.plugin.action.VPActionController;
import com.vp.plugin.model.factory.IModelElementFactory;

import it.unibz.inf.ontouml.vp.OntoUMLPlugin;
import it.unibz.inf.ontouml.vp.utils.StereotypeUtils;

public class ActivateOntoUMLPlugin implements VPActionController {

@Override
public void performAction(VPAction arg0) {

if (!OntoUMLPlugin.isPluginActive) {

// StereotypeUtils.removeAllModelStereotypesButOntoUML(IModelElementFactory.MODEL_TYPE_CLASS);
// StereotypeUtils.removeAllModelStereotypesButOntoUML(IModelElementFactory.MODEL_TYPE_ASSOCIATION);
StereotypeUtils.setUpOntoUMLStereotypes();
OntoUMLPlugin.isPluginActive = true;

}

}

@Override
public void update(VPAction arg0) {
}

}
Loading

0 comments on commit a72c78c

Please sign in to comment.