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

Refactor ide independent stuff into an ide plugin #41

Merged
merged 5 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/.checkstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="KIELER Checkstyle Configuration" location="/de.cau.cs.kieler.config/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="KIELER Checkstyle Configuration" local="true">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
8 changes: 8 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
40 changes: 40 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.cau.cs.kieler.klighd.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
formatter_profile=_KIELER
formatter_settings_version=12
org.eclipse.jdt.ui.javadoc=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * KIELER - Kiel Integrated Environment for Layout Eclipse RichClient\n *\n * http\://rtsys.informatik.uni-kiel.de/kieler\n * \n * Copyright ${year} by\n * + Kiel University\n * + Department of Computer Science\n * + Real-Time and Embedded Systems Group\n * \n * This code is provided under the terms of the Eclipse Public License (EPL).\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * {@inheritDoc}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
19 changes: 19 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: KIELER Lightweight Diagrams Ide Components
Bundle-SymbolicName: de.cau.cs.kieler.klighd.ide;singleton:=true
Bundle-Version: 1.1.1.qualifier
Automatic-Module-Name: de.cau.cs.kieler.klighd.ide
Require-Bundle: de.cau.cs.kieler.klighd;visibility:=reexport,
de.cau.cs.kieler.klighd.kgraph,
org.eclipse.xtext.xbase,
de.cau.cs.kieler.klighd.krendering.extensions,
org.eclipse.elk.alg.layered,
org.eclipse.elk.core
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: Kiel University
Export-Package: de.cau.cs.kieler.klighd.ide,
de.cau.cs.kieler.klighd.ide.model,
de.cau.cs.kieler.klighd.ide.syntheses,
de.cau.cs.kieler.klighd.ide.syntheses.action
30 changes: 30 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>July 01, 2015</p>
<h3>License</h3>

<p>The Real-Time and Embedded Systems Group, Department of Computer Science, Kiel University (&quot;RTSYS&quot;)
makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>

<p>If you did not receive this Content directly from the RTSYS, the Content is
being redistributed by another party (&quot;Redistributor&quot;) 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 via <a href="http://www.rtsys.informatik.uni-kiel.de">http://www.rtsys.informatik.uni-kiel.de</a>.
(Refer to &quot;KIELER&quot;, &quot;Downloads&quot;, &quot;Source Code&quot;)</p>

</body>
</html>
8 changes: 8 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source.. = src/,\
xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
about.html,\
icons/
26 changes: 26 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="de.cau.cs.kieler.klighd.diagramSyntheses">
<diagramSynthesis
class="de.cau.cs.kieler.klighd.syntheses.GuiceBasedSynthesisFactory:de.cau.cs.kieler.klighd.ide.syntheses.MessageModelSynthesis"
id="de.cau.cs.kieler.klighd.ui.syntheses.MessageModelSynthesis">
</diagramSynthesis>
<diagramSynthesis
class="de.cau.cs.kieler.klighd.syntheses.GuiceBasedSynthesisFactory:de.cau.cs.kieler.klighd.ide.syntheses.EObjectFallbackSynthesis"
id="de.cau.cs.kieler.klighd.ui.syntheses.EObjectFallbackSynthesis">
</diagramSynthesis>
<diagramSynthesis
class="de.cau.cs.kieler.klighd.syntheses.GuiceBasedSynthesisFactory:de.cau.cs.kieler.klighd.ide.syntheses.ErrorModelSynthesis"
id="de.cau.cs.kieler.klighd.ui.view.syntheses.ErrorModelSynthesis">
</diagramSynthesis>
</extension>
<extension
point="de.cau.cs.kieler.klighd.extensions">
<action
class="de.cau.cs.kieler.klighd.ide.syntheses.action.EcoreModelExpandDetailsAction"
id="de.cau.cs.kieler.klighd.ui.view.syntheses.action.EcoreModelExpandDetailsAction">
</action>
</extension>
</plugin>
37 changes: 37 additions & 0 deletions plugins/de.cau.cs.kieler.klighd.ide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.cau.cs.kieler.klighd</groupId>
<artifactId>plugins</artifactId>
<version>1.1.1-SNAPSHOT</version>
</parent>

<groupId>de.cau.cs.kieler.klighd</groupId>
<artifactId>de.cau.cs.kieler.klighd.ide</artifactId>
<version>1.1.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<!-- Ignore the optional dependency to kiml.ui while computing the classpath!
That dependency has been introduced because of registration of the
customized handler for "de.cau.cs.kieler.kiml.ui.command.layout".
Actually the dependency is not required at runtime but IMO
it is justified because of reference of the command id.
Note that this can't be kept in case further optional dependencies
are added that need to be resolved for compiling all classes. -->
<optionalDependencies>ignore</optionalDependencies>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
* Copyright 2020 by
* + Kiel University
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
*
* This code is provided under the terms of the Eclipse Public License (EPL).
*/
package de.cau.cs.kieler.klighd.ide;

/**
* @author sdo
*
*/
public class KlighdIdePlugin {

/** The plug-in ID. */
public static final String PLUGIN_ID = "de.cau.cs.kieler.klighd.ide"; //$NON-NLS-1$
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* This code is provided under the terms of the Eclipse Public License (EPL).
* See the file epl-v10.html for the license text.
*/
package de.cau.cs.kieler.klighd.ui.view.model;
package de.cau.cs.kieler.klighd.ide.model;

import java.io.PrintWriter;
import java.io.StringWriter;

import org.eclipse.core.runtime.Platform;

import de.cau.cs.kieler.klighd.ui.view.KlighdViewPlugin;
import de.cau.cs.kieler.klighd.ide.KlighdIdePlugin;

/**
* Represents errors and exceptions. Displayed as error message with a huge error sign.
Expand Down Expand Up @@ -55,7 +55,7 @@ public ErrorModel(final String message) {
*/
public ErrorModel(final String message, final String reason, final String stacktrace) {
// CHECKSTYLEOFF MagicNumber NEXT
super(message, reason, KlighdViewPlugin.PLUGIN_ID, "icons/full/model/error_sign.png", 250);
super(message, reason, KlighdIdePlugin.PLUGIN_ID, "icons/full/model/error_sign.png", 250);
// reason
String reasonToSet = "Unkown";
if (reason == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* This code is provided under the terms of the Eclipse Public License (EPL).
* See the file epl-v10.html for the license text.
*/
package de.cau.cs.kieler.klighd.ui.view.model;
package de.cau.cs.kieler.klighd.ide.model;

/**
* A simple message model. Provides a title, message and icon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* This code is provided under the terms of the Eclipse Public License (EPL).
* See the file epl-v10.html for the license text.
*/
package de.cau.cs.kieler.klighd.ui.view.syntheses
package de.cau.cs.kieler.klighd.ide.syntheses

import com.google.common.collect.HashBasedTable
import com.google.common.collect.Table
Expand All @@ -32,7 +32,7 @@ import de.cau.cs.kieler.klighd.krendering.extensions.KPortExtensions
import de.cau.cs.kieler.klighd.krendering.extensions.KRenderingExtensions
import de.cau.cs.kieler.klighd.microlayout.PlacementUtil
import de.cau.cs.kieler.klighd.syntheses.AbstractDiagramSynthesis
import de.cau.cs.kieler.klighd.ui.view.syntheses.action.EcoreModelExpandDetailsAction
import de.cau.cs.kieler.klighd.ide.syntheses.action.EcoreModelExpandDetailsAction
import de.cau.cs.kieler.klighd.util.KlighdProperties
import java.util.List
import java.util.Map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
* This code is provided under the terms of the Eclipse Public License (EPL).
* See the file epl-v10.html for the license text.
*/
package de.cau.cs.kieler.klighd.ui.view.syntheses
package de.cau.cs.kieler.klighd.ide.syntheses

import de.cau.cs.kieler.klighd.ide.model.MessageModel
import de.cau.cs.kieler.klighd.ide.syntheses.MessageModelSynthesis
import de.cau.cs.kieler.klighd.kgraph.KNode
import de.cau.cs.kieler.klighd.krendering.Colors
import de.cau.cs.kieler.klighd.krendering.KRectangle
import de.cau.cs.kieler.klighd.krendering.KRoundedRectangle
import de.cau.cs.kieler.klighd.krendering.extensions.KContainerRenderingExtensions
import de.cau.cs.kieler.klighd.krendering.extensions.KRenderingExtensions
import de.cau.cs.kieler.klighd.syntheses.AbstractDiagramSynthesis
import de.cau.cs.kieler.klighd.ui.view.model.ErrorModel
import de.cau.cs.kieler.klighd.ui.view.model.MessageModel
import de.cau.cs.kieler.klighd.ui.view.syntheses.action.ErrorModelShowExceptionAction
import de.cau.cs.kieler.klighd.ide.model.ErrorModel
import de.cau.cs.kieler.klighd.ide.syntheses.action.AbstractErrorModelShowExceptionAction
import javax.inject.Inject

/**
Expand Down Expand Up @@ -67,8 +68,8 @@ class ErrorModelSynthesis extends AbstractDiagramSynthesis<ErrorModel> {
messageRect.addText("[Show Exception]") => [
foreground = Colors.BLUE;
fontSize = 9;
addSingleClickAction(ErrorModelShowExceptionAction.ID);
addDoubleClickAction(ErrorModelShowExceptionAction.ID);
addSingleClickAction(AbstractErrorModelShowExceptionAction.ID);
addDoubleClickAction(AbstractErrorModelShowExceptionAction.ID);
setGridPlacementData().from(LEFT, 8, 0, TOP, 4, 0).to(RIGHT, 8, 0, BOTTOM, 8, 0);
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* This code is provided under the terms of the Eclipse Public License (EPL).
* See the file epl-v10.html for the license text.
*/
package de.cau.cs.kieler.klighd.ui.view.syntheses
package de.cau.cs.kieler.klighd.ide.syntheses

import de.cau.cs.kieler.klighd.ide.model.MessageModel
import de.cau.cs.kieler.klighd.kgraph.KNode
import de.cau.cs.kieler.klighd.krendering.extensions.KContainerRenderingExtensions
import de.cau.cs.kieler.klighd.krendering.extensions.KNodeExtensions
import de.cau.cs.kieler.klighd.krendering.extensions.KRenderingExtensions
import de.cau.cs.kieler.klighd.syntheses.AbstractDiagramSynthesis
import de.cau.cs.kieler.klighd.ui.view.model.MessageModel
import javax.inject.Inject

import static extension de.cau.cs.kieler.klighd.syntheses.DiagramSyntheses.*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
* Copyright 2020 by
* + Kiel University
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
*
* This code is provided under the terms of the Eclipse Public License (EPL).
*/
package de.cau.cs.kieler.klighd.ide.syntheses.action;

import de.cau.cs.kieler.klighd.IAction;

/**
* @author sdo
*
*/
public abstract class AbstractErrorModelShowExceptionAction implements IAction {

/** The action ID. */
public static final String ID = "de.cau.cs.kieler.klighd.ui.view.syntheses.action.ErrorModelShowExceptionAction";
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
*
* This code is provided under the terms of the Eclipse Public License (EPL).
*/
package de.cau.cs.kieler.klighd.ui.view.syntheses.action;
package de.cau.cs.kieler.klighd.ide.syntheses.action;

import java.util.Iterator;

import de.cau.cs.kieler.klighd.IAction;
import de.cau.cs.kieler.klighd.ide.syntheses.EObjectFallbackSynthesis;
import de.cau.cs.kieler.klighd.kgraph.KNode;
import de.cau.cs.kieler.klighd.ui.view.syntheses.EObjectFallbackSynthesis;
import de.cau.cs.kieler.klighd.util.ModelingUtil;

/**
Expand Down
Loading