Compute breakpoint default set based on language of editor

This commit is contained in:
Peter Dell 2022-09-10 23:09:06 +02:00
parent a3d6cd75c8
commit 29538d2880

View File

@ -45,16 +45,16 @@ import com.wudsn.ide.lng.editor.LanguageEditor;
public final class LanguageBreakpointAdapterFactory implements IToggleBreakpointsTargetFactory {
private String TARGET_ID_PREFIX = LanguageBreakpointsTarget.class.getName() + ".";
private Set<String> defaultSet;
public LanguageBreakpointAdapterFactory() {
defaultSet = new HashSet<String>();
defaultSet.add(TARGET_ID_PREFIX);
}
@Override
public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) {
if (part instanceof LanguageEditor) {
Set<String> defaultSet = new HashSet<String>();
defaultSet.add(getDefaultToggleTarget(part, selection));
return defaultSet;
}
return Collections.emptySet();