removed dependency from symbol dialog plugin to core boot ide plugin and code cleanup
This commit is contained in:
@@ -16,7 +16,6 @@ Require-Bundle: org.eclipse.ui,
|
||||
com.google.guava,
|
||||
org.eclipse.core.jobs,
|
||||
org.eclipse.core.runtime;bundle-version="3.13.0",
|
||||
org.springframework.ide.eclipse.boot,
|
||||
org.springsource.ide.eclipse.commons.core
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-Activator: org.springframework.tooling.ls.eclipse.gotosymbol.GotoSymbolPlugin
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Pivotal, Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.springframework.tooling.ls.eclipse.gotosymbol;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
@@ -22,10 +23,11 @@ public class GotoSymbolPlugin extends AbstractUIPlugin {
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
this.instance = this;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static GotoSymbolPlugin getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,15 +14,9 @@ package org.springframework.tooling.ls.eclipse.gotosymbol.dialogs;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.dialogs.IDialogSettings;
|
||||
import org.eclipse.jface.dialogs.PopupDialog;
|
||||
import org.eclipse.jface.layout.GridDataFactory;
|
||||
import org.eclipse.jface.text.IRegion;
|
||||
import org.eclipse.jface.text.ITextSelection;
|
||||
import org.eclipse.jface.text.source.SourceViewer;
|
||||
import org.eclipse.jface.util.Geometry;
|
||||
import org.eclipse.jface.viewers.IDoubleClickListener;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.ITreeContentProvider;
|
||||
@@ -31,11 +25,9 @@ import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.eclipse.lsp4e.outline.SymbolsLabelProvider;
|
||||
import org.eclipse.lsp4j.SymbolInformation;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.events.KeyAdapter;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -46,7 +38,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.TreeItem;
|
||||
import org.eclipse.ui.texteditor.ITextEditor;
|
||||
import org.springframework.ide.eclipse.boot.util.Log;
|
||||
import org.springframework.tooling.ls.eclipse.gotosymbol.GotoSymbolPlugin;
|
||||
import org.springframework.tooling.ls.eclipse.gotosymbol.util.SwtConnect;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.UIValueListener;
|
||||
@@ -55,14 +46,6 @@ import org.springsource.ide.eclipse.commons.livexp.ui.Disposable;
|
||||
@SuppressWarnings("restriction")
|
||||
public class GotoSymbolDialog extends PopupDialog {
|
||||
|
||||
private static final boolean DEBUG = (""+Platform.getLocation()).contains("kdvolder");
|
||||
|
||||
private static void debug(String string) {
|
||||
if (DEBUG) {
|
||||
System.out.println(string);
|
||||
}
|
||||
}
|
||||
|
||||
private static class SymbolsContentProvider implements ITreeContentProvider {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.stream.Collectors;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.lsp4j.SymbolInformation;
|
||||
import org.springframework.ide.eclipse.boot.util.Log;
|
||||
import org.springframework.tooling.ls.eclipse.gotosymbol.GotoSymbolPlugin;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.AsyncLiveExpression.AsyncMode;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.LiveExpression;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.LiveVariable;
|
||||
@@ -79,7 +79,7 @@ public class GotoSymbolDialogModel {
|
||||
status.setValue("No symbol provider");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
GotoSymbolPlugin.getInstance().getLog().log(ExceptionUtil.status(e));
|
||||
status.setValue(ExceptionUtil.getMessage(e));
|
||||
}
|
||||
return ImmutableSet.of();
|
||||
|
||||
@@ -26,7 +26,8 @@ import org.eclipse.lsp4j.WorkspaceSymbolParams;
|
||||
import org.eclipse.lsp4j.services.LanguageServer;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
import org.springframework.ide.eclipse.boot.util.Log;
|
||||
import org.springframework.tooling.ls.eclipse.gotosymbol.GotoSymbolPlugin;
|
||||
import org.springsource.ide.eclipse.commons.livexp.util.ExceptionUtil;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@@ -66,7 +67,7 @@ public class InWorkspaceSymbolsProvider implements SymbolsProvider {
|
||||
.get(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
|
||||
allSymbols.addAll(symbolsFuture);
|
||||
} catch (Exception e) {
|
||||
Log.log(e);
|
||||
GotoSymbolPlugin.getInstance().getLog().log(ExceptionUtil.status(e));
|
||||
}
|
||||
}
|
||||
return allSymbols.build();
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.springsource.ide.eclipse.commons.livexp.core.LiveExpression;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.LiveVariable;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.UIValueListener;
|
||||
import org.springsource.ide.eclipse.commons.livexp.core.ValueListener;
|
||||
import org.springsource.ide.eclipse.commons.livexp.ui.Disposable;
|
||||
|
||||
/**
|
||||
* Static helper methods for attaching LiveExps to SWT widgets.
|
||||
|
||||
Reference in New Issue
Block a user