Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
cleanup.add_missing_deprecated_annotations=true
cleanup.add_missing_methods=false
cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=false
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=true
cleanup.format_source_code=false
cleanup.format_source_code_changes_only=false
cleanup.make_local_variable_final=false
cleanup.make_parameters_final=true
cleanup.make_private_fields_final=false
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
cleanup.organize_imports=false
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=true
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=true
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
cleanup.remove_unused_private_fields=true
cleanup.remove_unused_private_members=false
cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_parentheses_in_expressions=true
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=false
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.javadoc=true
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=true
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
import org.eclipse.lsp4jakarta.commons.JakartaJavaProjectLabelsParams;
import org.eclipse.lsp4jakarta.commons.JavaCursorContextResult;
import org.eclipse.lsp4jakarta.commons.ProjectLabelInfoEntry;
import org.eclipse.lsp4jakarta.commons.codeaction.CodeActionResolveData;
import org.eclipse.lsp4jakarta.commons.utils.JSONUtility;
import org.eclipse.lsp4jakarta.jdt.core.ProjectLabelManager;
import org.eclipse.lsp4jakarta.jdt.core.PropertiesManagerForJava;
import org.eclipse.lsp4jakarta.jdt.internal.core.ls.JDTUtilsLSImpl;
import org.eclipse.lsp4jakarta.ls.api.JakartaLanguageClientAPI;
import org.eclipse.lsp4jakarta.commons.codeaction.CodeActionResolveData;
import org.eclipse.lsp4jakarta.commons.utils.JSONUtility;

import io.openliberty.tools.eclipse.ls.plugin.LibertyToolsLSPlugin;

Expand Down Expand Up @@ -79,7 +79,7 @@ public CompletableFuture<JakartaJavaCompletionResult> getJavaCompletion(JakartaJ
try {
completionList = PropertiesManagerForJava.getInstance().completion(javaParams, JDTUtilsLSImpl.getInstance(), monitor);
JavaCursorContextResult javaCursorContext = PropertiesManagerForJava.getInstance().javaCursorContext(javaParams,
JDTUtilsLSImpl.getInstance(), monitor);
JDTUtilsLSImpl.getInstance(), monitor);
return new JakartaJavaCompletionResult(completionList, javaCursorContext);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
Expand Down Expand Up @@ -145,7 +145,7 @@ public CompletableFuture<List<CodeAction>> getJavaCodeAction(JakartaJavaCodeActi
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
try {
return (List<CodeAction>) PropertiesManagerForJava.getInstance().codeAction(javaParams, JDTUtilsLSImpl.getInstance(),
monitor);
monitor);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
return Collections.emptyList();
Expand All @@ -164,7 +164,7 @@ public CompletableFuture<CodeAction> resolveCodeAction(CodeAction unresolved) {
CodeActionResolveData resolveData = JSONUtility.toModel(unresolved.getData(), CodeActionResolveData.class);
unresolved.setData(resolveData);
return (CodeAction) PropertiesManagerForJava.getInstance().resolveCodeAction(unresolved, JDTUtilsLSImpl.getInstance(),
monitor);
monitor);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ public JakartaLSConnection() {
setCommands(commands);
setWorkingDirectory(System.getProperty("user.dir"));
} catch (IOException e) {
LibertyToolsLSPlugin.getDefault().getLog()
.log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
LibertyToolsLSPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public boolean visit(IResourceDelta delta) {

// Look for changes to liberty-plugin-config.xml, *.properties, and *.env
if ("liberty-plugin-config.xml".equalsIgnoreCase(resource.getName())
|| "properties".equalsIgnoreCase(resource.getFileExtension())
|| "env".equalsIgnoreCase(resource.getFileExtension())) {
|| "properties".equalsIgnoreCase(resource.getFileExtension())
|| "env".equalsIgnoreCase(resource.getFileExtension())) {
changed.add(resource.getLocationURI().toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public LibertyLSConnection() {
setCommands(commands);
setWorkingDirectory(System.getProperty("user.dir"));
} catch (IOException e) {
LibertyToolsLSPlugin.getDefault().getLog()
.log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
LibertyToolsLSPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,55 @@
*/
public class LibertyToolsLSPlugin extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "io.openliberty.tools.eclipse.lsp4e"; //$NON-NLS-1$
// The plug-in ID
public static final String PLUGIN_ID = "io.openliberty.tools.eclipse.lsp4e"; //$NON-NLS-1$

// The shared instance
private static LibertyToolsLSPlugin plugin;
// The shared instance
private static LibertyToolsLSPlugin plugin;

/**
* The constructor
*/
public LibertyToolsLSPlugin() {
}
/**
* The constructor
*/
public LibertyToolsLSPlugin() {
}

@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static LibertyToolsLSPlugin getDefault() {
return plugin;
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static LibertyToolsLSPlugin getDefault() {
return plugin;
}

public static void logException(String localizedMessage, JavaModelException e) {
// TODO Auto-generated method stub
public static void logException(String localizedMessage, JavaModelException e) {
// TODO Auto-generated method stub

}
}

public static String getPluginId() {
return LibertyToolsLSPlugin.PLUGIN_ID;
}
public static String getPluginId() {
return LibertyToolsLSPlugin.PLUGIN_ID;
}

public static void log(IStatus status) {
getDefault().getLog().log(status);
}
public static void log(IStatus status) {
getDefault().getLog().log(status);
}

public static void logException(String errMsg, Throwable ex) {
getDefault().getLog().log(new Status(IStatus.ERROR, getPluginId(), errMsg, ex));
public static void logException(String errMsg, Throwable ex) {
getDefault().getLog().log(new Status(IStatus.ERROR, getPluginId(), errMsg, ex));

}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public CompletableFuture<List<CodeAction>> getJavaCodeAction(MicroProfileJavaCod
}

return (List<CodeAction>) PropertiesManagerForJava.getInstance().codeAction(javaParams, JDTUtilsLSImpl.getInstance(),
monitor);
monitor);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
return Collections.emptyList();
Expand Down Expand Up @@ -218,9 +218,9 @@ public CompletableFuture<MicroProfileJavaCompletionResult> getJavaCompletion(Mic
IProgressMonitor monitor = getProgressMonitor(cancelChecker);
try {
CompletionList completionList = PropertiesManagerForJava.getInstance().completion(javaParams, JDTUtilsLSImpl.getInstance(),
monitor);
monitor);
JavaCursorContextResult javaCursorContext = PropertiesManagerForJava.getInstance().javaCursorContext(javaParams,
JDTUtilsLSImpl.getInstance(), monitor);
JDTUtilsLSImpl.getInstance(), monitor);
return new MicroProfileJavaCompletionResult(completionList, javaCursorContext);
} catch (JavaModelException e) {
LibertyToolsLSPlugin.logException(e.getLocalizedMessage(), e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public LibertyMPLSConnection() {
setCommands(commands);
setWorkingDirectory(System.getProperty("user.dir"));
} catch (IOException e) {
LibertyToolsLSPlugin.getDefault().getLog()
.log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
LibertyToolsLSPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, LibertyToolsLSPlugin.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Loading
Loading