Skip to content

Commit

Permalink
Release of version 0.3.0 (#56)
Browse files Browse the repository at this point in the history
* Serialization of Enumeration Literals (#11)

* Included complete OntoUML stereotype list and improved JSON serialization (#9)

* All Steryotypes removed and OntoUML steryotypes added

on plugin start, remove all UML steryotypes both type class and association and install  OntoUML stereotypes.

* Fixed package name.

* buttons for load/unload ontoUML stereotypes

* improve the activation of the default stereotypes

when activate the default stereotype, removed the stereotypes that are  already in the classes.

* [WIP] print json schema for all elements in project. Still missing some features.

added testModel.vpp to the vpp projects folder

* added support for association and other types

* Testing commit

* [wip] added uri to the elements

* Ongoing integration

* Functional remote verification

Non-blocking, logged, remote verification.
Requires refactoring.

* Minor improvements

Bug-fixes and refactoring

* Minor fixes

* Improved generation and error display on LOG 

Transformation shall be updated to workaround limitations of GSON's serialization and improvements on OntoUML Schema.

* Changing Stereotypes with Right Click

* Experimenting with default color profiles

* Fixing GSON issue and ClassCastException

* Updating stereotypes

* Setting up configurations menu

* Configurations Menu

* General improvements

* General refactoring and bugfix

* General refactoring and bugfix #2

* Major Refactoring and Documentation

Classes yet to be refactored/documented:
 - ActivateOntoUMLPlugin
 - ActivateDefaultStereotypes
 - StereotypeUtils
 - CollectionAdapter
 - Most classes within package it.unibz.inf.ontouml.vp.model

* Model Export feature and refactoring

* Auto-coloring feature and icons update

* Minor improvements to auto-coloring

It now affects all views of the selected model element.

* Maven project (#7)

* maven project

* removed readme

* openapi.jar was added to the project folder in order to be executed out of the box using maven compile.

* changed folder name lib to repo / changed compiler to java 11 in pom.xml

* gitignore updated

* solved identation in git ignore file

* Revert "Merge branch 'development' into maven-project"

This reverts commit a72c78c, reversing
changes made to 1cd30e4.

* Update .gitignore

* Delete openapi.jar

* Update .gitignore

* Removed unused imports

* Update .gitignore

* Including debug dependencies

* Cleaning POM file

* added generation of zip file of the plugin

* Update README and .gitignore

Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>
Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* removed toolbar buttons and removed some options in configurations panel.

* cardinality updated

* removed comment

* Removed XML Export Window.

* removed if to test if model verification is enabled

* fixed url server verification

* Fixed string regex in AssociationEnd

* set timeout for 60s in request verification

* added some logs in verification and also added behavior to check if custom server is enabled before mounting the URL.

* Added all stereotypes

* Stereotype order

* Update stereotype serialization

* Removed unused import

* Coloring enabled by default

* Update Stereotypes.java

* updated associationEnd and Attribute cardinalities

* change aggregationkind when applying stereotypes and set abstract to true when aplying mixin stereotype to classes

* [WIP] - implementing new schema

* wip - corrections in model creation to adapt to the new schema

* remove propertyAssignment class.

* created reference class

* fixes

* fix

* Some updates

Ongoing changes

* added propertyAssignment build

* wip - added property assignment to reflect better tagged values, add DataType class as well.

* isDerived logic

* Removed <<historical>> stereotype.

<<historicalDependence>> should be used instead.

* Update .gitignore

* Removed Stereotypes.java

This class only responsibility was to add the prefix ontouml/2 or vp/custom to stereotypes on the serialization. We decided not to have this prefixes on the exchanged models anymore.

* Update ModelExportAction.java

* Removed Reload plugin button

* Bugfix null pointer on Association and Property constructors

* removed datatype class and included datatype constructor in class class. Removed AssociationEnd and Attribute classes because it will be handled by Property class.

* fixed associationclass

* propertyAssignments in all elements

* fixed setName and isDerived

* fixed property assignments for association end

* added some comments

* id was not being set in Package Element

* added description field to the elements

* if description is empty set attribut to null

* fixed Reference in Generalization constructor

* fixed reference in GeneralizationSet

* fixed tagged values when model element is not specified

* ready to be merged

* Improvements from code review

* Removed duplicated code and fixed transformation of missing propertyType

* Missing refactoring from tagged value extraction

* Update Class.java

Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>
Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>

* added Literal class for enumeration serialization

Co-authored-by: Viola <victorviola86@gmail.com>
Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* Hotfix: Null pointer exception on Class constructor (#13)

* fixed constructor - checked this.stereotypes for null before using.

* Update Class.java

Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>

* Serialization improvements on propertyAssignments and Generalization and GUI improvement on Model Export (#12)

* Included complete OntoUML stereotype list and improved JSON serialization (#9)

* All Steryotypes removed and OntoUML steryotypes added

on plugin start, remove all UML steryotypes both type class and association and install  OntoUML stereotypes.

* Fixed package name.

* buttons for load/unload ontoUML stereotypes

* improve the activation of the default stereotypes

when activate the default stereotype, removed the stereotypes that are  already in the classes.

* [WIP] print json schema for all elements in project. Still missing some features.

added testModel.vpp to the vpp projects folder

* added support for association and other types

* Testing commit

* [wip] added uri to the elements

* Ongoing integration

* Functional remote verification

Non-blocking, logged, remote verification.
Requires refactoring.

* Minor improvements

Bug-fixes and refactoring

* Minor fixes

* Improved generation and error display on LOG 

Transformation shall be updated to workaround limitations of GSON's serialization and improvements on OntoUML Schema.

* Changing Stereotypes with Right Click

* Experimenting with default color profiles

* Fixing GSON issue and ClassCastException

* Updating stereotypes

* Setting up configurations menu

* Configurations Menu

* General improvements

* General refactoring and bugfix

* General refactoring and bugfix #2

* Major Refactoring and Documentation

Classes yet to be refactored/documented:
 - ActivateOntoUMLPlugin
 - ActivateDefaultStereotypes
 - StereotypeUtils
 - CollectionAdapter
 - Most classes within package it.unibz.inf.ontouml.vp.model

* Model Export feature and refactoring

* Auto-coloring feature and icons update

* Minor improvements to auto-coloring

It now affects all views of the selected model element.

* Maven project (#7)

* maven project

* removed readme

* openapi.jar was added to the project folder in order to be executed out of the box using maven compile.

* changed folder name lib to repo / changed compiler to java 11 in pom.xml

* gitignore updated

* solved identation in git ignore file

* Revert "Merge branch 'development' into maven-project"

This reverts commit a72c78c, reversing
changes made to 1cd30e4.

* Update .gitignore

* Delete openapi.jar

* Update .gitignore

* Removed unused imports

* Update .gitignore

* Including debug dependencies

* Cleaning POM file

* added generation of zip file of the plugin

* Update README and .gitignore

Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>
Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* removed toolbar buttons and removed some options in configurations panel.

* cardinality updated

* removed comment

* Removed XML Export Window.

* removed if to test if model verification is enabled

* fixed url server verification

* Fixed string regex in AssociationEnd

* set timeout for 60s in request verification

* added some logs in verification and also added behavior to check if custom server is enabled before mounting the URL.

* Added all stereotypes

* Stereotype order

* Update stereotype serialization

* Removed unused import

* Coloring enabled by default

* Update Stereotypes.java

* updated associationEnd and Attribute cardinalities

* change aggregationkind when applying stereotypes and set abstract to true when aplying mixin stereotype to classes

* [WIP] - implementing new schema

* wip - corrections in model creation to adapt to the new schema

* remove propertyAssignment class.

* created reference class

* fixes

* fix

* Some updates

Ongoing changes

* added propertyAssignment build

* wip - added property assignment to reflect better tagged values, add DataType class as well.

* isDerived logic

* Removed <<historical>> stereotype.

<<historicalDependence>> should be used instead.

* Update .gitignore

* Removed Stereotypes.java

This class only responsibility was to add the prefix ontouml/2 or vp/custom to stereotypes on the serialization. We decided not to have this prefixes on the exchanged models anymore.

* Update ModelExportAction.java

* Removed Reload plugin button

* Bugfix null pointer on Association and Property constructors

* removed datatype class and included datatype constructor in class class. Removed AssociationEnd and Attribute classes because it will be handled by Property class.

* fixed associationclass

* propertyAssignments in all elements

* fixed setName and isDerived

* fixed property assignments for association end

* added some comments

* id was not being set in Package Element

* added description field to the elements

* if description is empty set attribut to null

* fixed Reference in Generalization constructor

* fixed reference in GeneralizationSet

* fixed tagged values when model element is not specified

* ready to be merged

* Improvements from code review

* Removed duplicated code and fixed transformation of missing propertyType

* Missing refactoring from tagged value extraction

* Update Class.java

Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>
Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>

* added new file dialog to export model. Also suggets filename.

* if no property assignment added - return null

* if a Generalization has stereotypes in both ends does not add this generalization to the model.

* export json

Changed view to File Dialog
Now suggests the same name of the last save

* Quick fix on name suggestion

* Removed unused semicolon

* Only serializes generalizations between classes or associations

* Update ModelElement.java

Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>
Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>

* Hotfix: Null pointer exception when reading outdate config file (#14)

* Bugfix

* Remove unnecessary sysout call

Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* Feature to disable associations dynamically (#15)

* added feature to disable associations dynamically

* Bugfix when applying <<mode>>, <<quality>>, <<relator>> and <<manifestation>>

* added missing source stereotype (Quality)

* Update ApplyStereotype.java

* Fixed category case when setting the possible relations

* changed types do HashMap

* removed powertype from the association stereotypes list and also removed some unused imports

* implementation changed to use a single map with all constraints.

* removed unused imports

* Update AssociationConstraints.java

* Minor improvements

Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>
Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* [WIP] Listeners and basic coloring.

* [WIP] coloring all model

* [WIP] Smart Coloring fixes

* fix in smart paint

* fixed unused code

* paint diagram button improved listeners

* if auto coloring disabled do not paint

* WIP added listeners when load the plugin. Still need to evaluate where the listeners should be.

* fixed mixins coloring

* fixed coloring to match mixin pattern

* fixed subkinds in a row

* Small fixes

* Avoids repeating code

* Renamed COLOR_NON_SORTAL to  COLOR_UNKNOWN

* fixes and removed unused code

* added smartpaint in applystereotype

It is been hard to deal with stereotype listener

* removed unused listeners

* Removed println() that I commited by mistake

* Update SmartColoring.java

* Menubar Icon update

* working for generalization changes

* Update OntoUML server URL

* removed unused imports

* Added a warning when the user clicks on smart paint and the auto coloring is set to false.

* fixed null pointer exception when removing generalization.

* Fixed NullPointerException when serializing generalizations

* Bugfix on my previous fix ;)

* added dialog box when user clicks in smart paint

* Updates Smart Paint actions and removes unused imports

* Updates listeners, improves readability and prevents exceptions

* todo's removed.

* Quick systout fix

* Syntax verification (#17)

* verification response warning dialog and messages in log panel

* improved log messages and created function to get icon path.

* Minor fixes

* Adds verification dialog method

* some http response handled and added some try/catch

* Updates dialogs in case of failure

Co-authored-by: Claudenir Morais Fonseca <claudenirmf@gmail.com>

* Connects plugin to the server for model transformation to gUFO (#18)

* Initial commit

* Connects to the server

* Minor issues

* addded verification for custom server in transformation to gufo also adapted verification function url building.

* added option to retry export to gUFO using the default server.

* added option to retry in verification service if service custom has problems

* Adds protection to Server Not Found

Co-authored-by: Viola <victorviola86@gmail.com>

* Smart meta properties feature (#27)

* set meta-properties whole model

* bug fixed when applying stereotypes for associations.

* set cardinalities if null or unspecified.

* update smartproperties.java to avoid duplicated code.

* set readonly only where it is true.

* fixed bug in cardinality setting.

* Fixed cardinality value on <<termination>>

* renamed smartProperties to SmartModelling. Moved functions from ApplyStereotype to SmartModelling class. Removed set meta properties from listeners and added to the class ApplyStereotype.

* Bugfix: HistoricalDependence

* Group all "smart modeling" features together

Plus: 
1. Material relations are 1..* by defaul only when relating roles.
2. subQuantityOf is, by default, readOnly=true on the part end

* Removed unused imports

* Created function to set default meta properties also for classes

* Cleaned up SmartModeling.java

Co-authored-by: Victor Viola <victor.viola@farfetch.com>
Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>

* Disable stereotypes as you model (#28)

Implement the features described in issues #23 and #26 

* disabling stereotypes as you model.

* removed unecessary comments

* added option in configurations to enable/disable smart modelling

* Fixed allowed supertypes of Subkind

* Subkinds cannot specialize Types

* fix in setting allowed stereotypes in generalizations

* fixed layout for configurations panel.

* Fixed null pointer when subtype or super type did not have stereotypes

* Enabling/disabling smart modeling applies to associations and classes

* Toggling smart modeling also impacts association default metaproperties

Co-authored-by: Victor Viola <victor.viola@farfetch.com>
Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>

* diagram verification

* added user logs to distinct between diagram/model verification. Also added protection to runs the diagram verification only if there is a class diagram opened.

* Adjusted messages display in dialogs displayed after verification is called

* Small improvements to the message log

* New Log Panel and highlight elements after verification.

* improved textArea in log panel. Now user cannot edit the text.

* open specification option in context menu / disable take me there if class is not in any diagram

* border between results in log panel

* Updates ViewUtils

* Updates ViewUtils

* changed log panel to use JList.

* Updates ViewUtils

* Apply stereotype feature works when multiple classes are selected (#39)

* apply multiple sterotypes at same time. Only works if all elements in the selection are the same.

* if selection has classes and associations selected at the same time validate rule for only the object that had the click.

* apply same stereotype for all elements selected

* fix update stereotype when selection multiple objects.

* when user selects more than one object do not apply constraints

* added new Fixed menu - now suggests stereotypes only when 1 class is selected or all selected classes have the same super class.

* fixed action behavior in context menu of the model explorer

* fixed context menu when selecting stereotypes from model explorer

Co-authored-by: Victor Viola <victor.viola@farfetch.com>

* Issue31 add progress bar (#44)

* apply multiple sterotypes at same time. Only works if all elements in the selection are the same.

* if selection has classes and associations selected at the same time validate rule for only the object that had the click.

* apply same stereotype for all elements selected

* fix update stereotype when selection multiple objects.

* when user selects more than one object do not apply constraints

* added new Fixed menu - now suggests stereotypes only when 1 class is selected or all selected classes have the same super class.

* fixed action behavior in context menu of the model explorer

* fixed context menu when selecting stereotypes from model explorer

* progressBar first version

* progress bar when calling diagram verification

* progresspanel - WIP

* fixes - wip

* progresbar with threads. Now user can cancel the request.

* fixed bug in case of exception or response null

* added message when user cancel the request.

* added progress bar to export to json after user selects the filename and file directory

* first close the progess bar then show the dialog

* added progress bar when exporting to gufo

* removed duplcated code.

* bug fixed when selecting an invalid endpoint

* bug fixed when handling model verification response

* added progress dialog to the functions that connects to the server. Improved the way the progress dialog works.

* improved in how the loading box closes.

* Fixed null pointer when canceling the model export

Co-authored-by: Victor Viola <victor.viola@farfetch.com>
Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>

* Made project compliant to Maven's  default folder structure

* Fixes on pom.xml

* Executing VP with plugin through Maven

* Added maven wrapper

* Skip installation of plugin on local maven directory

* Updates scripts

* Improved README.md

* Cleaned up run.sh

* Added build profiles to distinguish exec scripts

* added .bat script to mvn exec in windows

* Fixed unix run-vp script

* improved bat script

* Update README.md

* added version label in settings panel (#48)

* Added support for OntoUML tagged values(#37)

* Adds proper generation of stereotypes

* Updates apply stereotypes and serialization

* Working on tagged value overwrite

* Bug fix

* Updates class serialization

* Fix tagged value update

* Refactor methods

* Bugfix apply fixed menu

* Updates context menus for properties

* Updates properties menus

* Updated set order dialog

* Includes abstract nature

* Updates JSON serialization

* Bugfix

* BugFix

* Additional options added to the contextual menus

* Removes local maven variables from repo

* Updates Meta-Properties context menu

* Updates enabling of meta-properties context menu

Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>

* Bugfix duplicated tagged values

* New UI to access the ontouml2gufo service (#49)

* WIP - checkbox tree for diagrams and model

* added dynamic icons to the tree

* improved icon setting.

* wip - added option to choose between trees

* Save user config when exporting to GUFO

* wip - selection tree - retrieving nodes

* fixed window control

* created new constructors.

* fix bug when calling class constructor

* added comments and removed others.

* Moved icons

* wip - package tree explorer

* now models and packages have priority in the package tree.

* added new model elements to package tree

* added option to check class without checking attributes

* fix attribute selection

* check all same objects in the tree

* fixed identation

* fixed multiple selection when have commom objects in the selection.

* fixed selection for classes

* now the tree is saving in the configurations

* fixed attributes when selecting classes

* fixed model snapshot when selecting generalization sets

* consider IDiagramUIModel as its parent element

* now nodes of the tree are being inserted sorted.

* now tree is organized per type AND alphabetically

* added associations and generalizations to the package tree

* select classes of the same type of the attribute selected.

* check types for subtree

* request improved

* improved tree cell renderer

* 1st version export view

* new export to gufo window finished

* fixed diagram saving element

* added new icons

* new icons

* icon for package changed

* fixed model building

* improved selection for similar node

* improved threads

* changed icon for association end

* name for association end

* changed name root element for diagram tree

* fixed nullpointer

* add labels for combos

* resize window false

* prevent window export to be opened twice

* prevent config window to be opened twice

* changed UI export

* removed unused component

* adjust in UI

* adjust in UI

* improved layout

* fixed label

* layout improvement

* adjust

* new layout for export - wip

* layout improvement - wip

* added table

* added packages tab

* Changed labels

* Added default language option

* layout adjust

* update

* ui updated

* adjust ui

* Adjusted labels

* Set Base IRI default value

* UI fixes

* changed default behavior for tables

* get json string from tables

* generating json to send transformation to server

* Bugfix on allowed nature serialization

* Updates export file format and datatype serialization

* Minor refactoring

* Bugfix tag removal on apply meta-properties

* Updates meta-property serialization

* Minor presentation issue

* Bugfix on suggested stereotypes

* Bugifx on gufo options export

* fixed model building for tree and package

* added port number to the default server

* code improved

* adjusted images

* select generalizations when g_set is selected

* fixed tree for diagram and package views

* fixed serialization

* fixed name of the generalizations in the tree

* Fixed element and package mapping serialization

Removed duplicate code

* General code improvements

* Smart painting based on restrictedTo meta-property

* Fixed bugs related to tagged values

* Updates listeners for restrictedTo inference

* Updates inference criteria

* Updates ApplyProperties

* Improving manipulation of tagged values

* Updates interaction with tagged values

* BugFix

 - Add listeners in projects that were "not created" (when the tool open without opening an existing project)

- Binds tagged value definitions to to stereotypes instead of simply adding them to the stereotype's tagged value definition container

* Bugfix and cleanup

* Bugfix

Updates color when adding existing model element to diagram

* Updates smart modeling of historical roles

* BugFixes and updates menu ordering, menu access, and color scheme

* Bugfix historicalRole rule

* Updates «historicalRoleMixin»

* Updates applicable stereotype based on generalization

* Updates association constraints JSON file

* Updates association constraints JSON file

* Updates ReportErrorAction

* Updates guides and bug report

* Updates README

* Updates images size

* Updates report error URL

* Updates README

* Updates plugin update feature

* Updates README

* Bugfix default cardinalities

* Updates situations support

* Updates README

Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>
Co-authored-by: Claudenir M. Fonseca <claudenirmf@gmail.com>

Co-authored-by: Tiago Prince Sales <tgoprince@users.noreply.github.com>
Co-authored-by: Viola <victorviola86@gmail.com>
Co-authored-by: Victor Viola <victor.viola@farfetch.com>
Co-authored-by: Tiago Prince Sales <tgoprince@gmail.com>
Co-authored-by: Tiago Prince Sales <tiago.princesales@unibz.it>
  • Loading branch information
6 people authored Aug 4, 2020
1 parent 2fbb4c5 commit cf9431b
Show file tree
Hide file tree
Showing 138 changed files with 10,445 additions and 1,901 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ repo/
.idea/
*.iml
ontouml-vp-plugin.zip

.java-version
117 changes: 117 additions & 0 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";

/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";

/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);

File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}

private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}

}
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
245 changes: 227 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,248 @@ This project contains a [Visual Paradigm](https://www.visual-paradigm.com/) plug
This project is defined under the umbrella of the [OntoUML Server](https://github.com/OntoUML/ontouml-server) project and is currently a proof of concept.

If you are interested to know more, feel free to open an issue to provide feedback on the project or reach our team members for more specific cases:

* [Claudenir M. Fonseca](https://github.com/claudenirmf)
* [Tiago Prince Sales](https://github.com/tgoprince)
* [Lucas Bassetti](https://github.com/LucasBassetti)
* [Victor Viola](https://github.com/victorviola)

## Installation Instructions
## Contents

* [Overview](#overview)
* [User Instructions](#user-instructions)
* [Developer Instructions](#developer-instructions)
* [Report Errors](#report-errors)
* [FAQ](#faq)

___

## Overview

The **OntoUML Plugin for Visual Paradigm** adds to any version of Visual Paradigm features designed for OntoUML modelers. These features range from enabling OntoUML stereotypes in class diagrams to model verification and transformation.

WARNING: some more advanced features are based on web services that process your model remotely. The software processing these models is also [openly available](https://github.com/OntoUML/ontouml-server) and if you prefer to have your models processed in your own server, you are able to set it up and change the server URL in the plugin's settings.

### Features

#### OntoUML Enhanced Modeling

Stereotypes and meta-properties that are essential to OntoUML modeling are easily available to classes, associations and attributes with a simple right-click.

Notice that beyond the full list of stereotypes, a dynamic list of stereotypes is also available. This dynamic list is usually preferred during modeling as it filters wrong stereotypes for your class or association based on, respectively, their super/sub classes and their associated classes. The full list, however, tends to provide a faster and more flexible option during model fixing and refactoring.

![GIF showing a OntoUML model being edited](./resources/feature-modeling.gif)

![A screenshot of a suggested list of stereotypes in a context menu](./resources/feature-suggested-stereotypes.png)

![A screenshot of meta-properties editing in context menu](./resources/feature-meta-properties.png)

![A screenshot of restricted instances menu selection](./resources/feature-restricte-to.png)

Try selecting multiple elements to fast update your models!

#### Smart Paint

Automatic diagram painting based on the possible instances of classes with highlighted ultimate sortals (i.e., «kind», «collective», «quantity», «relator», «mode», and «quality») for improved model readability.

![A screenshot of an automatically painted diagram](./resources/feature-smart-paint.png)

#### Smart Modeling

Smart modeling allows the plugin to set default values to OntoUML model elements based on their stereotypes that are different from the defaults of UML speeding up modeling.

Since the Smart Paint feature depends on the "restrictedTo" meta-property, it is directly affected by Smart Modeling (responsible for assigning this meta-property).

#### Model Verification and Diagram Verification

Automatic verification of OntoUML syntactical rules which are reported to the user to manage. At the moment the list of constraints is being re-developed and users may find that new checks were introduced during the period they work on their products.

To install the **OntoUML Plugin for Visual Paradigm**, please go to our [releases page](https://github.com/OntoUML/ontouml-vp-plugin/releases).
The Diagram Verification feature performs the verification of the whole model but only displays issues about elements present in the currently open diagram, facilitating the user's task of fixing models.

## Development Instructions
![A gif exemplifying the model verification feature](./resources/feature-verification.gif)

#### Model Transformation to OWL with gUFO

Model transformation into OWL with support of the [Lightweight Implementation of the Unified Foundational Ontology (UFO) - gUFO](https://nemo-ufes.github.io/gufo/).

Users must select the elements that shall be exported to gUFO either selecting from the model or from the desired diagrams. A number of options may also be set by the user for the transformation.

**WARNING**: the transformation feature require the presence of no verification errors among the exported entities. In addition, partial transformations of the model should be executed with care as they may introduce violations of some syntactical constraint.

![A screenshot showing the "transformation to gUFO" window](./resources/feature-gufo.png)

#### Continuos Updates

The remote features are constantly updated and any fixes to them you not require you to update your Visual Paradigm plugin.

And last, but not least, this project is supported by the [OntoUML.org](https://ontouml.org/) community and its set of features will only grow, incorporating new and updated OntoUML technologies.

![A screenshot showing the toolbar of the OntoUML plugin](./resources/feature-toolbar.png)

In order to update to a new version of the plugin, please download the latest [release](https://github.com/OntoUML/ontouml-vp-plugin/releases) as a ZIP file and select it through the "Update Plugin" button in the plugin (available from version 0.3.0).

Back to [top](#ontouml-plugin-for-visual-paradigm).

___

## User Instructions

To **install** or **update** the **OntoUML Plugin for Visual Paradigm**, please go to our [releases page](https://github.com/OntoUML/ontouml-vp-plugin/releases) and download the ZIP file `ontouml-vp-plugin` in the latest release. Then go to `Help > Install Plugin` in the top of your window and, after clicking `Install from a zip of plugin` and `Next`, select the download release.

![Install plugin window](./resources/toolbar-help-install.png)

![Install plugin window](./resources/install-plugin-dialog.png)

For more details, check out this [guide](https://knowhow.visual-paradigm.com/openapi/how-to-deploy-plugins-to-vp-application/).

Back to [top](#ontouml-plugin-for-visual-paradigm).

___

## Developer Instructions

### Requirements

Requirements:
* [Visual Paradigm](https://www.visual-paradigm.com/)
* [Maven](https://maven.apache.org/)
* Java 8 or later
* Maven (optional, a Maven Wrapper is embedded in the project)

### Build instructions

#### Setting up

1. Clone the project

`git clone https://github.com/OntoUML/ontouml-vp-plugin.git`

2. Open `pom.xml` and set the value of the variables listed below:

2.1. Set the path to the folder in which the Visual Paradigm application is located:

```xml
<visualparadigm.app.dir>
/Applications/Visual Paradigm.app/Contents/Resources/app
</visualparadigm.app.dir>
```

This path is typically:

* On Windows: `C:\Program Files\Visual Paradigm CE 16.1`
* On macOS: `/Applications/Visual Paradigm.app/Contents/Resources/app/`

2.2. Set the path to Visual Paradigm's plugin folder

```xml
<visualparadigm.plugin.dir>
/Users/<YOUR_USERNAME>/Library/Application Support/VisualParadigm/plugins
</visualparadigm.plugin.dir>
```

This path is typically:

* On Linux: `~/.config/VisualParadigm/plugins/`
* On Windows: `C:\Users\<YOUR_USER_NAME>\AppData\Roaming\VisualParadigm\plugins\`
* On macOS: `/Users/<YOUR_USERNAME>/Library/Application Support/VisualParadigm/plugins/`

#### Maven Commands

The commands listed below invoke Maven through the Maven Wrapper.
On Windows, replace `./mvnw` for `./mvnw.cmd`

In any OS, to invoke your local Maven installation instead of the wrapper, replace `./mvnw` with `mvn`.

* To **compile** the plugin, run:

```shell script
$ ./mvnw compile
```

The compiled files will be created in the `target` folder.

* To **compile** and **package** the plugin, run

```shell script
$ ./mvnw package
```

This command will create, within the `target` folder, a `*.zip` file that can be distributed to the end users of the plugin.

* To **compile**, **package**, and **install** the plugin, run

```shell script
$ ./mvnw install
```

In addition to the previous results, this command will copy the compiled files to Visual Paradigm's `plugins` folder.

* To **run** Visual Paradigm while being able to see the output in the command line, run:

```shell script
$ ./mvnw exec:exec
```

Note that before running this command, you should install the plugin. That can be achieved by running:

```shell script
$ ./mvnw install exec:exec
```

* To **clean** the built files, run:

```shell script
$ ./mvnw clean
```

This does not remove the installed files, just the `target` folder and its contents.

Back to [top](#ontouml-plugin-for-visual-paradigm).

___

## Report Errors

In case you are reading this, thank you for interesting on contributing to our efforts by submitting your questions/suggestions or reporting errors in our tool.

If you have a GitHub account, head over to our [issues section](https://github.com/OntoUML/ontouml-vp-plugin/issues) and submit bugs, suggestions, or questions.

If you don't have a GitHub account but still would like to contribute by reporting an error in our plugin, please fill in this [form](https://forms.gle/btx7CDSy9kn5yb3WA) sharing as many details as you wish. We will be creating a issue to discuss and solve any problems and improve our tool.

Before submitting issues, however, search for [previous issues](https://github.com/OntoUML/ontouml-vp-plugin/issues) or questions in our [FAQ](#faq) as there may already be a solution to your problem.

Also, the more detailed your issue the better. Therefore, we encourage you to share with us details on what happened, screenshot, project files (either `.vpp` files or [exported XML projects](https://www.visual-paradigm.com/support/documents/vpuserguide/124/218/6848_exportingxml.html)), and Visual Paradigm logs (see [how to retrieve Visual Paradigm's log](https://knowhow.visual-paradigm.com/technical-support/vp-log/)). Remember that the issues you post (differently from the [form](https://forms.gle/btx7CDSy9kn5yb3WA)) are public.

Back to [top](#ontouml-plugin-for-visual-paradigm).

___

## FAQ

* [Why do I get the error message "The ID [...] is already in use"?](#why-do-i-get-the-error-message-"the-id-[...]-is-already-in-use")

* [Why Protégé gives me an error message when I try to open my ontology exported to gUFO?](#why-protégé-gives-me-an-error-message-when-i-try-to-open-my-ontology-exported-to-gufo)

* [I had an error while updating the plugin through the "Update Plugin" button and now it does not work](#I-had-an-error-while-updating-the-plugin-through-the-"Update-Plugin"-button-and-now-it-does-not-work)

### Why do I get the error message "The ID [...] is already in use"?

![Error message: ID already in use](./resources/faq-id-in-use.png)

Each Visual Paradigm plugin must (i) have an ID, and (ii) be installed in a specific folder. If you are updating to a new version of the plugin, it may occur that the name of the folder has changed. In this case, Visual Paradigm will think that you are trying to install a new plugin with an ID already in use instead of updating it.

![Install plugin window](./resources/install-plugin-dialog-folder-path.png)

Build instructions:
* Clone this project within Visual Paradigm's `plugins` folder, typically:
* `~/.config/VisualParadigm/plugins/` in **Linux**
* `C:\Users\<YOUR_USER_NAME>\AppData\Roaming\VisualParadigm\plugins\` in **Windows**
* `~/Library/Application Support/VisualParadigm/plugins/` in **macOS**
To solve this issue, go to the `plugins` folder listed in the "Install Plugin" window (see above) and delete your old plugin folder before installing the new version. You may be required to re-open the application for that to take effect.

```git clone https://github.com/OntoUML/ontouml-vp-plugin.git```
### Why Protégé gives me an error message when I try to open my ontology exported to gUFO?

* To import necessary Visual Paradigm dependencies, run the `initialization` command passing the path to your Visual Paradigm installation `VISUAL_PARADIGM_PATH`
* `VISUAL_PARADIGM_PATH` in **macOS** is typically `/Applications/Visual\ Paradigm.app/Contents/Resources/app/`
Some users reported issues when trying to open their ontologies on [Protégé](https://protege.stanford.edu/) after using the ["Export to gUFO"](#Model-Transformation-to-OWL-with-gUFO) feature. In order to avoid this problem, we recommend you to use stable releases of Protégé (the desktop version) and avoid beta releases. You can find the latest release on their [official website]((https://protege.stanford.edu/)) and their complete list of releases in this [link](https://protegewiki.stanford.edu/wiki/Protege_Desktop_Old_Versions).

```mvn initialize -Dvisualparadigm.app.dir=VISUAL_PARADIGM_PATH```
Also, make sure that your machine is connected to the internet so Protégé can load the [gUFO](https://nemo-ufes.github.io/gufo/) ontology which is used but not included in the exported file.

* To compile your source, run
If you still have problems opening your ontology, please [report it](#Report-Errors) so we can improve our solutions.

```mvn compile -Dvisualparadigm.app.dir=VISUAL_PARADIGM_PATH```
### I had an error while updating the plugin through the "Update Plugin" button and now it does not work

* To generate an ZIP plugin installation, run
In that case, the error may have corrupted the previous installation. Please access the plugins folder of Visual Paradigm (instructions [here](#why-do-i-get-the-error-message-"the-id-[...]-is-already-in-use")) and manually remove old plugins' folders. After this, extract the new version you tried to update to into this (now empty) folder. If you have other Visual Paradigm plugins in these folder, there is no need to delete does, only the OntoUML one.

```mvn package -Dvisualparadigm.app.dir=VISUAL_PARADIGM_PATH```
Back to [top](#ontouml-plugin-for-visual-paradigm).
Loading

0 comments on commit cf9431b

Please sign in to comment.