Author: scabanovich
Date: 2008-04-09 10:40:34 -0400 (Wed, 09 Apr 2008)
New Revision: 7466
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java
Log:
JBIDE-1065
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2008-04-09
14:34:07 UTC (rev 7465)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2008-04-09
14:40:34 UTC (rev 7466)
@@ -36,10 +36,7 @@
*
*/
public class JSPMultiPageContributor extends AbstractMultiPageContributor {
- protected RetargetTextEditorAction fShowTooltipAction = null; // show
- protected RetargetTextEditorAction fContentAssist = null;
-
public JSPMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
}
@@ -49,19 +46,6 @@
initEditMenu(bars);
ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
- fShowTooltipAction = new RetargetTextEditorAction(resourceBundle,
- StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION
- + StructuredTextEditorActionConstants.DOT);
- fShowTooltipAction
- .setActionDefinitionId(ActionDefinitionIds.INFORMATION);
-
- fContentAssist = new RetargetTextEditorAction(
- resourceBundle,
- StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS
- + StructuredTextEditorActionConstants.DOT);
- fContentAssist
- .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-
//TODO-3.3: keep checking if 'quick fix' action appears in WTP
// fQuickFix = new RetargetTextEditorAction(resourceBundle,
// StructuredTextEditorActionConstants.ACTION_NAME_QUICK_FIX
@@ -72,18 +56,22 @@
protected void createAssistObjects() {
ResourceBundle resourceBundle = ResourceHandler.getResourceBundle();
- fContentAssistProposal = new RetargetTextEditorAction(
+ if(fContentAssistProposal == null) {
+ fContentAssistProposal = new RetargetTextEditorAction(
resourceBundle,
StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS
- + StructuredTextEditorActionConstants.DOT);
- fContentAssistProposal
+ + StructuredTextEditorActionConstants.UNDERSCORE);
+ fContentAssistProposal
.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ }
- fContentAssistTip = new RetargetTextEditorAction(resourceBundle,
- StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION
- + StructuredTextEditorActionConstants.DOT);
- fContentAssistTip
+ if(fContentAssistTip == null) {
+ fContentAssistTip = new RetargetTextEditorAction(resourceBundle,
+ StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION
+ + StructuredTextEditorActionConstants.UNDERSCORE);
+ fContentAssistTip
.setActionDefinitionId(ActionDefinitionIds.INFORMATION);
+ }
}
public void setActiveEditor(IEditorPart part) {
@@ -148,14 +136,6 @@
actionBars.setGlobalActionHandler(ActionFactory.SAVE.getId(),
getAction(editor, ITextEditorActionConstants.SAVE));
- fShowTooltipAction
- .setAction(getAction(
- editor,
- StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION));
- fContentAssist
- .setAction(getAction(
- editor,
- StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS));
//TODO-3.3: keep checking if 'quick fix' action appears in WTP
// fQuickFix
// .setAction(getAction(
@@ -176,13 +156,13 @@
}
if (editor != null && handler != null) {
// editor
- registerKeyBindings(handler, ACTIONS_2, editor);
+// registerKeyBindings(handler, ACTIONS_2, editor);
String[] ACTIONS_3 = {
- StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION,
- StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS,
+// StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION,
+// StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS,
// TODO-3.3 StructuredTextEditorActionConstants.ACTION_NAME_QUICK_FIX
};
- registerKeyBindings(handler, ACTIONS_3, editor);
+// registerKeyBindings(handler, ACTIONS_3, editor);
}
}
cleanActionBarStatus();
@@ -224,10 +204,7 @@
super.dispose();
fActiveEditorPart=null;
mainPart=null;
- fContentAssist=null;
fContentAssistProposal=null;
fContentAssistTip=null;
- fShowTooltipAction=null;
-
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java 2008-04-09
14:34:07 UTC (rev 7465)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java 2008-04-09
14:40:34 UTC (rev 7466)
@@ -63,7 +63,6 @@
if (activeEditor != null) {
ISelectionProvider selectionProvider = activeEditor.getSite()
.getSelectionProvider();
- System.out.println(selectionProvider);
if (selectionProvider != null)
return selectionProvider.getSelection();
}
Show replies by date