Skip to content
Browse files

fixed errorneous commandids

  • Loading branch information...
1 parent a2aeb2e commit 9928ede8ca8d7635918fc8a61ad47c8135750ee7 sefftinge committed Feb 2, 2010
View
20 plugins/org.eclipse.xtext.ui.core/plugin.xml
@@ -50,7 +50,7 @@
</menuContribution>
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
- <command commandId="org.eclipse.xtext.ui.ToggleCommentAction"
+ <command commandId="org.eclipse.xtext.ui.core.ToggleCommentAction"
style="push">
<visibleWhen
checkEnabled="false">
@@ -62,7 +62,7 @@
</menuContribution>
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
- <command commandId="org.eclipse.xtext.ui.FormatAction"
+ <command commandId="org.eclipse.xtext.ui.core.FormatAction"
style="push">
<visibleWhen
checkEnabled="false">
@@ -88,19 +88,19 @@
name="Format"
description="Format text"
categoryId="org.eclipse.xtext.ui.core.category.XtextEditor"
- id="org.eclipse.xtext.ui.FormatAction">
+ id="org.eclipse.xtext.ui.core.FormatAction">
</command>
<command
name="Toggle Comment"
description="Toggle comment"
categoryId="org.eclipse.xtext.ui.core.category.XtextEditor"
- id="org.eclipse.xtext.ui.ToggleCommentAction">
+ id="org.eclipse.xtext.ui.core.ToggleCommentAction">
</command>
<command
name="Got to Matching Bracket"
description="Got to Matching Bracket"
categoryId="org.eclipse.xtext.ui.core.category.XtextEditor"
- id="org.eclipse.xtext.ui.GotToMatchingBracketAction">
+ id="org.eclipse.xtext.ui.core.GotToMatchingBracketAction">
</command>
<category
description="Xtext Editing Commands"
@@ -121,23 +121,23 @@
point="org.eclipse.ui.bindings">
<key sequence="M1+M2+F"
contextId="org.eclipse.xtext.ui.core.XtextEditorScope"
- commandId="org.eclipse.xtext.ui.FormatAction"
+ commandId="org.eclipse.xtext.ui.core.FormatAction"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key sequence="M1+7"
contextId="org.eclipse.xtext.ui.core.XtextEditorScope"
- commandId="org.eclipse.xtext.ui.ToggleCommentAction"
+ commandId="org.eclipse.xtext.ui.core.ToggleCommentAction"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key sequence="M1+/"
contextId="org.eclipse.xtext.ui.core.XtextEditorScope"
- commandId="org.eclipse.xtext.ui.ToggleCommentAction"
+ commandId="org.eclipse.xtext.ui.core.ToggleCommentAction"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key sequence="M1+M2+C"
contextId="org.eclipse.xtext.ui.core.XtextEditorScope"
- commandId="org.eclipse.xtext.ui.ToggleCommentAction"
+ commandId="org.eclipse.xtext.ui.core.ToggleCommentAction"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key sequence="M1+M2+P"
contextId="org.eclipse.xtext.ui.core.XtextEditorScope"
- commandId="org.eclipse.xtext.ui.GotToMatchingBracketAction"
+ commandId="org.eclipse.xtext.ui.core.GotToMatchingBracketAction"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
</extension>
<extension
View
2 ...t.ui/src/org/eclipse/xtext/xtext/ui/editor/folding/XtextGrammarFoldingRegionProvider.java
@@ -28,6 +28,8 @@
@Override
protected List<IFoldingRegion> doGetFoldingRegions(IXtextDocument xtextDocument, XtextResource xtextResource) {
List<IFoldingRegion> result = Lists.newArrayList();
+ if (xtextResource==null || xtextResource.getContents().isEmpty())
+ return result;
EList<EObject> contents = xtextResource.getContents().get(0).eContents();
for (EObject eObject : contents) {
Position position = getPosition(xtextDocument, NodeUtil.getNodeAdapter(eObject).getParserNode());

0 comments on commit 9928ede

Please sign in to comment.
Something went wrong with that request. Please try again.