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

[#121] rename LspEditorUiPlugin into ClangdPlugin #123

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/org.eclipse.cdt.lsp.clangd/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Require-Bundle: org.eclipse.cdt.lsp;bundle-version="0.0.0",
org.eclipse.ui.ide;bundle-version="0.0.0",
org.eclipse.ui.workbench;bundle-version="0.0.0",
org.eclipse.ui.workbench.texteditor;bundle-version="0.0.0"
Bundle-Activator: org.eclipse.cdt.lsp.internal.clangd.editor.LspEditorUiPlugin
Bundle-Activator: org.eclipse.cdt.lsp.internal.clangd.editor.ClangdPlugin
Service-Component: OSGI-INF/org.eclipse.cdt.lsp.internal.clangd.ClangdConfigurationAccess.xml,
OSGI-INF/org.eclipse.cdt.lsp.internal.clangd.ClangdFallbackManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.eclipse.cdt.lsp.LspPlugin;
import org.eclipse.cdt.lsp.LspUtils;
import org.eclipse.cdt.lsp.internal.clangd.editor.LspEditorUiMessages;
import org.eclipse.cdt.lsp.internal.clangd.editor.LspEditorUiPlugin;
import org.eclipse.cdt.lsp.internal.clangd.editor.ClangdPlugin;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
Expand Down Expand Up @@ -57,7 +57,7 @@ public void handleEvent(CProjectDescriptionEvent event) {
try {
ClangdConfigurationManager.setCompilationDatabase(project, databasePath);
} catch (ScannerException e) {
var status = new Status(IStatus.ERROR, LspEditorUiPlugin.PLUGIN_ID, e.getMessage());
var status = new Status(IStatus.ERROR, ClangdPlugin.PLUGIN_ID, e.getMessage());
var configFile = ClangdConfigurationManager.CLANGD_CONFIG_FILE_NAME;
LspUtils.showErrorMessage(LspEditorUiMessages.CProjectChangeMonitor_yaml_scanner_error,
LspEditorUiMessages.CProjectChangeMonitor_yaml_scanner_error_message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,22 @@
/**
* The activator class controls the plug-in life cycle
*/
public class LspEditorUiPlugin extends AbstractUIPlugin {
public class ClangdPlugin extends AbstractUIPlugin {
private IPreferenceStore preferenceStore;
private IWorkspace workspace;
private CompileCommandsMonitor compileCommandsMonitor;
private CProjectChangeMonitor cProjectChangeMonitor;

// The plug-in ID
//FIXME: AF: change this value together with preferences rework
public static final String PLUGIN_ID = "org.eclipse.cdt.lsp.editor.ui"; //$NON-NLS-1$
public static final String PLUGIN_ID = "org.eclipse.cdt.lsp.clangd"; //$NON-NLS-1$

// The shared instance
private static LspEditorUiPlugin plugin;
private static ClangdPlugin plugin;

/**
* The constructor
*/
public LspEditorUiPlugin() {
public ClangdPlugin() {
}

@Override
Expand All @@ -69,13 +68,13 @@ public void stop(BundleContext context) throws Exception {
*
* @return the shared instance
*/
public static LspEditorUiPlugin getDefault() {
public static ClangdPlugin getDefault() {
return plugin;
}

public IPreferenceStore getLsPreferences() {
if (preferenceStore == null) {
preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, LspEditorUiPlugin.PLUGIN_ID);
preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, ClangdPlugin.PLUGIN_ID);
}
return preferenceStore;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private Set<IProject> collectAffectedProjects(IResourceChangeEvent event) {
return true;
});
} catch (CoreException e) {
StatusManager.getManager().handle(e, LspEditorUiPlugin.PLUGIN_ID);
StatusManager.getManager().handle(e, ClangdPlugin.PLUGIN_ID);
}
}
return projects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Optional;

import org.eclipse.cdt.lsp.LspPlugin;
import org.eclipse.cdt.lsp.internal.clangd.editor.LspEditorUiPlugin;
import org.eclipse.cdt.lsp.internal.clangd.editor.ClangdPlugin;
import org.eclipse.cdt.lsp.services.ClangdLanguageServer;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
Expand Down Expand Up @@ -88,7 +88,7 @@ private static void openEditor(IWorkbenchPage page, URI fileUri) {
try {
IDE.openEditor(page, fileUri, LspPlugin.LSP_C_EDITOR_ID, true);
} catch (PartInitException e) {
StatusManager.getManager().handle(e, LspEditorUiPlugin.PLUGIN_ID);
StatusManager.getManager().handle(e, ClangdPlugin.PLUGIN_ID);
}
});
}
Expand Down