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

Migrated eclipse.ui/SWT dependencies. #762

Closed
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/elkjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# We check against LTSs supported by GWT
# 8 - LTS
# 11 - LTS
java-version: [ 8, 11 ]
java-version: [ 11 ]
node-version: [ 12.x ]

steps:
Expand Down
1 change: 1 addition & 0 deletions build/org.eclipse.elk.repository/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<feature url="features/org.eclipse.elk.graph.json.source_0.8.0.qualifier.jar" id="org.eclipse.elk.graph.json.feature.source" version="0.8.0.qualifier">
<category name="elk"/>
</feature>

<category-def name="elk" label="Eclipse Layout Kernel">
<description>
Eclipse Layout Kernel components for the automatic layout of diagrams.
Expand Down
7 changes: 7 additions & 0 deletions features/org.eclipse.elk.ui.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,11 @@ SPDX-License-Identifier: EPL-2.0
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.elk.core.service.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
3 changes: 2 additions & 1 deletion plugins/org.eclipse.elk.conn.gmf/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ Require-Bundle: org.eclipse.gef;bundle-version="3.5.0",
org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.2.0",
com.google.guava,
org.eclipse.elk.graph,
org.eclipse.elk.core.service
org.eclipse.elk.core.service,
org.eclipse.elk.core.service.ui
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2020 Kiel University and others.
* Copyright (c) 2009, 2021 Kiel University and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -174,9 +174,9 @@ protected DiagramEditor getDiagramEditor(final IWorkbenchPart workbenchPart) {
}

@Override
public LayoutMapping buildLayoutGraph(final IWorkbenchPart workbenchPart, final Object diagramPart) {
public LayoutMapping buildLayoutGraph(final Object workbenchPart, final Object diagramPart) {
// get the diagram editor part
DiagramEditor diagramEditor = getDiagramEditor(workbenchPart);
DiagramEditor diagramEditor = getDiagramEditor((IWorkbenchPart) workbenchPart);

// choose the layout root edit part
IGraphicalEditPart layoutRootPart = null;
Expand Down Expand Up @@ -230,7 +230,7 @@ public LayoutMapping buildLayoutGraph(final IWorkbenchPart workbenchPart, final
}

// create the mapping
LayoutMapping mapping = buildLayoutGraph(layoutRootPart, selectedParts, workbenchPart);
LayoutMapping mapping = buildLayoutGraph(layoutRootPart, selectedParts, (IWorkbenchPart) workbenchPart);

return mapping;
}
Expand Down Expand Up @@ -288,7 +288,7 @@ protected static boolean isParent(final EditPart parent, final EditPart child) {
protected LayoutMapping buildLayoutGraph(final IGraphicalEditPart layoutRootPart,
final List<ShapeNodeEditPart> selection, final IWorkbenchPart workbenchPart) {

LayoutMapping mapping = new LayoutMapping(workbenchPart);
LayoutMapping mapping = new LayoutMapping((IWorkbenchPart) workbenchPart);
mapping.setProperty(CONNECTIONS, new LinkedList<ConnectionEditPart>());
mapping.setParentElement(layoutRootPart);

Expand Down Expand Up @@ -343,7 +343,7 @@ protected LayoutMapping buildLayoutGraph(final IGraphicalEditPart layoutRootPart
@Override
public void applyLayout(final LayoutMapping mapping, final IPropertyHolder settings) {
boolean zoomToFit = settings.getProperty(CoreOptions.ZOOM_TO_FIT);
IWorkbenchPart workbenchPart = mapping.getWorkbenchPart();
IWorkbenchPart workbenchPart = (IWorkbenchPart) mapping.getWorkbenchPart();
int animationTime = calcAnimationTime(mapping, settings,
workbenchPart != null && !workbenchPart.getSite().getPage().isPartVisible(workbenchPart));
mapping.setProperty(ANIMATION_TIME, animationTime);
Expand Down Expand Up @@ -522,7 +522,7 @@ protected void applyLayout(final LayoutMapping mapping) {
if (applyLayoutCommand != null) {
// Get a command stack to execute the command
CommandStack commandStack = mapping.getProperty(COMMAND_STACK);
IWorkbenchPart workbenchPart = mapping.getWorkbenchPart();
IWorkbenchPart workbenchPart = (IWorkbenchPart) mapping.getWorkbenchPart();
if (commandStack == null) {
if (workbenchPart != null) {
Object adapter = workbenchPart.getAdapter(CommandStack.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 Kiel University and others.
* Copyright (c) 2010, 2021 Kiel University and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -34,7 +34,6 @@
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.StringValueStyle;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.ui.IWorkbenchPart;

import com.google.common.collect.Maps;
import com.google.inject.Inject;
Expand All @@ -55,7 +54,7 @@ public static final class Provider implements ILayoutConfigurationStore.Provider
private IEditPartFilter editPartFilter;

@Override
public ILayoutConfigurationStore get(final IWorkbenchPart workbenchPart, final Object context) {
public ILayoutConfigurationStore get(final Object workbenchPart, final Object context) {
if (context instanceof EditPart) {
try {
return new GmfLayoutConfigurationStore((EditPart) context, editPartFilter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*******************************************************************************/
package org.eclipse.elk.core.debug.grandom.ide;

import com.google.inject.Binder;
import com.google.inject.name.Names;
import org.eclipse.elk.core.debug.grandom.ide.contentassist.antlr.GRandomParser;
import org.eclipse.elk.core.debug.grandom.ide.contentassist.antlr.internal.InternalGRandomLexer;
import org.eclipse.xtext.ide.DefaultIdeModule;
Expand All @@ -25,6 +23,9 @@
import org.eclipse.xtext.ide.server.rename.IRenameService;
import org.eclipse.xtext.ide.server.rename.RenameService;

import com.google.inject.Binder;
import com.google.inject.name.Names;

/**
* Manual modifications go to {@link GRandomIdeModule}.
*/
Expand Down
1 change: 1 addition & 0 deletions plugins/org.eclipse.elk.core.debug/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Require-Bundle: com.google.guava,
org.eclipse.core.runtime,
org.eclipse.elk.core,
org.eclipse.elk.core.service,
org.eclipse.elk.core.service.ui,
org.eclipse.elk.core.ui,
org.eclipse.elk.graph,
org.eclipse.pde.ui,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019 Kiel University and others.
* Copyright (c) 2019, 2021 Kiel University and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -10,7 +10,7 @@
package org.eclipse.elk.core.debug.actions;

import org.eclipse.elk.core.debug.ElkDebugPlugin;
import org.eclipse.elk.core.service.ElkServicePlugin;
import org.eclipse.elk.core.service.ui.EclipseElkServicePlugin;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
Expand Down Expand Up @@ -45,26 +45,26 @@ public PreferenceAction(final String preferenceId) {
updateCheckedState();

// Listen for preference changes
ElkServicePlugin.getInstance().getPreferenceStore().addPropertyChangeListener(propertyChangeListener);
EclipseElkServicePlugin.getInstance().getPreferenceStore().addPropertyChangeListener(propertyChangeListener);
}

/**
* Shuts down this action.
*/
public void dispose() {
ElkServicePlugin.getInstance().getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
EclipseElkServicePlugin.getInstance().getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
}

/**
* Updates the checked property of this action.
*/
public void updateCheckedState() {
setChecked(ElkServicePlugin.getInstance().getPreferenceStore().getBoolean(preferenceId));
setChecked(EclipseElkServicePlugin.getInstance().getPreferenceStore().getBoolean(preferenceId));
}

@Override
public void run() {
IPreferenceStore prefStore = ElkServicePlugin.getInstance().getPreferenceStore();
IPreferenceStore prefStore = EclipseElkServicePlugin.getInstance().getPreferenceStore();
prefStore.setValue(preferenceId, !prefStore.getBoolean(preferenceId));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2019 Kiel University and others.
* Copyright (c) 2011, 2021 Kiel University and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -17,7 +17,7 @@
import org.eclipse.elk.core.debug.model.ExecutionInfo;
import org.eclipse.elk.core.debug.model.ExecutionInfoModel;
import org.eclipse.elk.core.service.DiagramLayoutEngine;
import org.eclipse.elk.core.service.ElkServicePlugin;
import org.eclipse.elk.core.service.ui.EclipseElkServicePlugin;
import org.eclipse.elk.core.util.BasicProgressMonitor;
import org.eclipse.elk.core.util.IElkProgressMonitor;
import org.eclipse.elk.graph.ElkNode;
Expand Down Expand Up @@ -136,7 +136,7 @@ static ExecutionInfo layout(final String fileName, final ElkNode graph) {
* That object is not added to the {@link ExecutionInfoModel} by this method.
*/
static ExecutionInfo layout(final String fileName, final boolean performLayout, final ElkNode graph) {
IPreferenceStore prefStore = ElkServicePlugin.getInstance().getPreferenceStore();
IPreferenceStore prefStore = EclipseElkServicePlugin.getInstance().getPreferenceStore();
IElkProgressMonitor monitor =
new BasicProgressMonitor()
.withMaxHierarchyLevels(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*******************************************************************************/
package org.eclipse.elk.core.meta.ide;

import com.google.inject.Binder;
import com.google.inject.name.Names;
import org.eclipse.elk.core.meta.ide.contentassist.antlr.MetaDataParser;
import org.eclipse.elk.core.meta.ide.contentassist.antlr.internal.InternalMetaDataLexer;
import org.eclipse.xtext.ide.LexerIdeBindings;
Expand All @@ -25,6 +23,9 @@
import org.eclipse.xtext.ide.server.rename.RenameService;
import org.eclipse.xtext.xbase.ide.DefaultXbaseIdeModule;

import com.google.inject.Binder;
import com.google.inject.name.Names;

/**
* Manual modifications go to {@link MetaDataIdeModule}.
*/
Expand Down
7 changes: 7 additions & 0 deletions plugins/org.eclipse.elk.core.service.ui/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?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="output" path="bin"/>
</classpath>
40 changes: 40 additions & 0 deletions plugins/org.eclipse.elk.core.service.ui/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.elk.core.service.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<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>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
Loading