Skip to content
Permalink
Browse files

a modification for calling contentassistant was added.

  • Loading branch information
vahdat-ab committed Jul 9, 2016
1 parent 8d7a6ee commit 538c68e6878095d7553f5be58326f02ee774d5ec
@@ -24,10 +24,10 @@ public void dispose() {
@Override
protected void createActions() {
super.createActions();
// IAction action = new ContentAssistAction(new UmpResourceBoundle(), "ContentAssistProposal.", this);
// String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
// action.setActionDefinitionId(id);
// setAction("ContentAssistProposal", action);
// markAsStateDependentAction("ContentAssistProposal", true);
IAction action = new ContentAssistAction(new UmpResourceBoundle(), "ContentAssistProposal.", this);
String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
action.setActionDefinitionId(id);
setAction("ContentAssistProposal", action);
markAsStateDependentAction("ContentAssistProposal", true);
}
}
@@ -0,0 +1,23 @@
package org.cruise.umple.eclipse.plugin.editors;

import java.util.Enumeration;
import java.util.*;
import java.util.ResourceBundle;

public class UmpResourceBoundle extends ResourceBundle {

@Override
public Enumeration<String> getKeys() {
return Collections.enumeration(Arrays.asList("ContentAssistProposal.label","ContentAssistProposal.tooltip","ContentAssistProposal.description"));
}

@Override
protected Object handleGetObject(String arg0) {
// TODO Auto-generated method stub
if (arg0.equals("ContentAssistProposal.label")) return "Content assist";
if (arg0.equals("ContentAssistProposal.tooltip")) return "Content assist";
if (arg0.equals("ContentAssistProposal.description")) return "Provides Content Assistanc";
return null;
}

}

0 comments on commit 538c68e

Please sign in to comment.
You can’t perform that action at this time.