Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow switching between perspectives in the Integrated IDE #52

Merged
merged 7 commits into from
Apr 24, 2017
98 changes: 98 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.gramlab.api</groupId>
<artifactId>gramlab-api</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<!-- github server corresponds to entry in ~/.m2/settings.xml -->
<github.global.server>github</github.global.server>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>

<name>gramlab-ide-api</name>
<description>GramLab API library for adding plugins</description>
<organization><name>unitexgramlab.org</name></organization>
<url>http://unitexgramlab.org</url>
<inceptionYear>2016</inceptionYear>

<licenses>
<license>
<name>Apache ASLv2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/UnitexGramLab/gramlab-ide-api.git</connection>
<developerConnection>scm:git:https://github.com/UnitexGramLab/gramlab-ide-api.git</developerConnection>
<url>https://github.com/UnitexGramLab/gramlab-ide-api</url>
<tag>HEAD</tag>
</scm>

<developers>
<developer>
<id>ide-developers</id>
<name>The Unitex/GramLab IDE developers</name>
<url>https://github.com/orgs/UnitexGramLab/teams/ide</url>
<organization>Unitex/GramLab</organization>
<organizationUrl>http://unitexgramlab.org</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>

<dependencies>
<!-- provided dependencies -->
<dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<artifactId>pf4j</artifactId>
<version>0.13.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/gh-pages</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>gramlab-ide-maven-artifacts</repositoryName> <!-- github repo name -->
<repositoryOwner>UnitexGramLab</repositoryOwner> <!-- github username -->
<merge>true</merge>
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
</project>
120 changes: 120 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.gramlab.core</groupId>
<artifactId>gramlab-core</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<!-- github server corresponds to entry in ~/.m2/settings.xml -->
<github.global.server>github</github.global.server>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>

<name>gramlab-ide-core</name>
<description>GramLab's source code</description>
<organization><name>unitexgramlab.org</name></organization>
<url>http://unitexgramlab.org</url>

<licenses>
<license>
<name>Apache ASLv2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/UnitexGramLab/gramlab-ide-api.git</connection>
<developerConnection>scm:git:https://github.com/UnitexGramLab/gramlab-ide-api.git</developerConnection>
<url>https://github.com/UnitexGramLab/gramlab-ide-api</url>
<tag>HEAD</tag>
</scm>

<developers>
<developer>
<id>ide-developers</id>
<name>The Unitex/GramLab IDE developers</name>
<url>https://github.com/orgs/UnitexGramLab/teams/ide</url>
<organization>Unitex/GramLab</organization>
<organizationUrl>http://unitexgramlab.org</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>

<repositories>
<repository>
<id>org.gramlab.api</id>
<url>http://unitexgramlab.github.io/gramlab-ide-maven-artifacts/</url>
</repository>
</repositories>

<dependencies>
<!-- provided dependencies -->
<dependency>
<groupId>org.gramlab.api</groupId>
<artifactId>gramlab-api</artifactId>
<version>1.0.1-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<artifactId>pf4j</artifactId>
<version>0.13.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<type>jar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/gh-pages</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>gramlab-ide-maven-artifacts</repositoryName> <!-- github repo name -->
<repositoryOwner>UnitexGramLab</repositoryOwner> <!-- github username -->
<merge>true</merge>
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin></plugins>
</build>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
</project>
11 changes: 5 additions & 6 deletions core/src/main/java/org/gramlab/core/GramlabConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
import org.gramlab.core.umlv.unitex.config.ConfigManager;

import ro.fortsoft.pf4j.DefaultPluginManager;
import ro.fortsoft.pf4j.PluginManager;

import ro.fortsoft.pf4j.DefaultPluginManager;
import ro.fortsoft.pf4j.PluginManager;

public class GramlabConfigManager {

Expand All @@ -48,8 +44,11 @@ public static void initConfig(File path) {
if (path==null) {
path = new File(System.getProperty("user.dir"));
}

ConfigManager.setManager(new ProjectPreferences(path));

ProjectPreferences preferences = new ProjectPreferences(path);
//save preferences to reuse when switching back to Project-oriented
ConfigManager.setGramlabPreferences(preferences);
ConfigManager.setManager(preferences);
setCurrentProject(null);
user = System.getProperty("user.name");

Expand Down
Loading