chqu1012 / Language-Editor

This editor is for specifing the color of the keyword and the autocompletion of the editor. So each user can use one file to colorize his code at there own.
0 stars 0 forks source link

Add the seleced String to the content proposals #16

Closed chqu1012 closed 7 years ago

chqu1012 commented 7 years ago

Create new proposals by editor

chqu1012 commented 7 years ago

To add new proposals to specified group, used this:

ElementListSelectionDialog dialog = new ElementListSelectionDialog(shlSpriteCreator, new LabelProvider()); dialog.setMultipleSelection(false); dialog.setIgnoreCase(true); dialog.setAllowDuplicates(true); dialog.setMessage("Select an AI"); dialog.setTitle("What AI to use?"); dialog.setElements(new String[]{"HELLO","GOODBYE"}); if (dialog.open() == Window.OK) { aiControllerLocation = (String) dialog.getFirstResult(); }