Closed Rouche closed 8 years ago
Ah yeah we should use the default - good call. Wanna submit a PR for this? I think you are looking at the correct code to change.
Eek, well i was just checking code really fast.
Unfortunatelly im not setup as a plugin development to fully test it, it might take some time. I also dont understand where this property is used (editor.matchingBracketsColor), is it internally by Eclipse?
I think its just internal to the plugin. I can also take a shot at this change but it might be a while - its hard for me to find time to develop lately.
Its ok im trying to configure my environment. The project does not seem like the others ive seen. I dont see the "Maven Libraries" in classpath. Ill try tomorrow.
I might just use external maven and copy the generated jar in. Will be long but better than nothing :P
Regards
VICTORY!!! There was 2 ChainedPreferenceStore set. Obviously only the one in init was set. OR set last. for now i just added the TypeScript default at the start of the chain in init, but the right way to do it would be to go get JDT default (Or the store that set the built-in matching bracket for StructuredTextEditor)
I will try to figure this out and PR after, but at least the solution is there.
For reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=215265
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
if (input instanceof IPathEditorInput) {
IResource resource = ResourceUtil.getResource(input);
IProject project = resource.getProject();
// set a project-specific preference store
ChainedPreferenceStore chainedPreferenceStore = new ChainedPreferenceStore(new IPreferenceStore[] {
TypeScriptPlugin.getDefault().getPreferenceStore(),
new ProjectPreferenceStore(project),
EditorsUI.getPreferenceStore(),
PlatformUI.getPreferenceStore()
});
this.setPreferenceStore(chainedPreferenceStore);
}
}
@Override
protected void initializeEditor() {
super.initializeEditor();
this.characterPairMatcher = createCharacterPairMatcher();
// set the preference store
ChainedPreferenceStore chainedPreferenceStore = new ChainedPreferenceStore(new IPreferenceStore[] {
TypeScriptPlugin.getDefault().getPreferenceStore(),
EditorsUI.getPreferenceStore(),
PlatformUI.getPreferenceStore()
});
this.setPreferenceStore(chainedPreferenceStore);
}
cool :)
Hi,
I just want to know what color / system variable the TypeScript editor "matching bracket" color is using. I really want to change it because i use black theme. I tryed everything.
General->Editors->Text Editors->Annotations->Matching tags : Not working General->Editors->Structured Text Editor->Matching brackets highlight : Not working Javascript->Editor->Matching brackets highlight : Not working Java->Editor->Matching brackets highlight : Not working (of course)
Theres also another one defined in plugin.xml of org.eclipse.jdt.ui I overriden this color too. And yeah not working either.
Edit: I saw this line in IPreferenceConstants, should this line be changed to "org.eclipse.jdt.ui.matchingBracketsColor" ? It my screenshot this does not seem to be 128,128,128.
Thanks