Skip to content

Commit

Permalink
Merge branch 'master' into github
Browse files Browse the repository at this point in the history
  • Loading branch information
dofs197 committed Mar 29, 2021
2 parents 4e75ab3 + 4e83d2d commit 79d07b5
Show file tree
Hide file tree
Showing 8 changed files with 167 additions and 33 deletions.
1 change: 1 addition & 0 deletions plugins/ru.runa.gpd.form.ftl/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Method.DisplayMultipleSelectInList = Display multiple selection
Method.SelectFromValueList = Select value from value list
Method.MultipleSelectFromListUserVariables = Multiple select from user variables list (deprecated)
Method.MultipleSelectFromUserTypeList = Multiple select from user variables list
Method.SingleSelectFromUserTypeList = Single select from user variables list
Method.EditUserTypeList = Edit list of user variables
Method.DisplayListUserVariables = Display list of user variables (deprecated)
Method.DisplayUserTypeList = Display list of user variables
Expand Down
45 changes: 42 additions & 3 deletions plugins/ru.runa.gpd.form.ftl/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1131,11 +1131,50 @@
variableAccess="NONE">
</param>
</component>
<component
enabled="true"
id="SingleSelectFromUserTypeList"
name="%Method.SingleSelectFromUserTypeList"
order="-81">
<param
name="%Param.Variable"
optional="false"
type="varfinder"
variableAccess="WRITE"
variableTypeFilter="ru.runa.wfe.var.UserTypeMap">
</param>
<param
name="%Param.InputData"
optional="false"
type="usertypevarlistcombo"
variableAccess="READ"
variableTypeFilter="java.util.List">
</param>
<param
name="%Param.DisplayFormat"
type="combo"
variableAccess="NONE">
<paramValue
name="%Format.Variable.Component"
value="true">
</paramValue>
<paramValue
name="%Format.Variable.Output"
value="false">
</paramValue>
</param>
<param
name="%Param.Attributes"
optional="true"
type="usertypeattributelist"
variableAccess="NONE">
</param>
</component>
<component
enabled="true"
id="MultipleSelectFromUserTypeList"
name="%Method.MultipleSelectFromUserTypeList"
order="-82">
order="-80">
<param
name="%Param.Variable"
optional="false"
Expand Down Expand Up @@ -1175,7 +1214,7 @@
id="EditUserTypeList"
imageProvider="ru.runa.gpd.formeditor.ftl.image.VariableComponentImageProvider"
name="%Method.EditUserTypeList"
order="-81">
order="-79">
<param
name="%Param.Variable"
optional="false"
Expand Down Expand Up @@ -1234,7 +1273,7 @@
id="SelectFromInternalStorage"
imageProvider="ru.runa.gpd.formeditor.ftl.image.VariableComponentImageProvider"
name="%Method.SelectFromInternalStorage"
order="-80">
order="-78">
<param
name="%Param.UserType"
optional="false"
Expand Down
1 change: 1 addition & 0 deletions plugins/ru.runa.gpd.form.ftl/plugin_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Method.DisplayMultipleSelectInList = \u041e\u0442\u043e\u0431\u0440\u0430\u0437\
Method.SelectFromValueList = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439
Method.MultipleSelectFromListUserVariables = \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439)
Method.MultipleSelectFromUserTypeList = \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445
Method.SingleSelectFromUserTypeList = \u041e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445
Method.EditUserTypeList = \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445
Method.DisplayListUserVariables = \u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439)
Method.DisplayUserTypeList = \u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445
Expand Down
4 changes: 3 additions & 1 deletion plugins/ru.runa.gpd/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ pref.language.bpmn.expandContextButtonPad = Expand context button pad
ApplicationWorkbenchWindowAdvisor.window.title=RunaWFE Free Developer Studio
button.choose=Choose
button.ConnectionSettings = Connection settings
button.add.connection.server = Add
button.ConnectionSettings = Configure
button.test.connection = Test connection
button.add.connection = Add connection
button.delete.connection = Delete connection
Expand Down Expand Up @@ -332,6 +333,7 @@ help = Help
task.SynchronizeData = Synchronizing data
task.Connect = Connecting
task.LoadData = Loading data
task.LoadHistoryData = Loading process \"{0}\"'s history data
task.SaveData = Saving data
yes = Yes
no = No
Expand Down
4 changes: 3 additions & 1 deletion plugins/ru.runa.gpd/plugin_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ pref.language.bpmn.override = \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u
pref.language.bpmn.expandContextButtonPad = \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u043d\u0430 \u0433\u0440\u0430\u0444\u0435

button.choose=\u0412\u044b\u0431\u0440\u0430\u0442\u044c
button.ConnectionSettings = \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f
button.add.connection.server=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c
button.ConnectionSettings = \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c
button.test.connection = \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435
button.add.connection = \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435
button.delete.connection = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435
Expand Down Expand Up @@ -331,6 +332,7 @@ help = \u0421\u043f\u0440\u0430\u0432\u043a\u0430
task.SynchronizeData = \u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445
task.Connect = \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435
task.LoadData = \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445
task.LoadHistoryData = \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430 \"{0}\"
task.SaveData = \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445
yes = \u0414\u0430
no = \u041d\u0435\u0442
Expand Down
9 changes: 9 additions & 0 deletions plugins/ru.runa.gpd/src/ru/runa/gpd/search/SearchPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ protected void showMatch(Match match, int offset, int length, boolean activate)
ElementMatch elementMatch = (ElementMatch) match.getElement();
IEditorPart editor = null;
if (ElementMatch.CONTEXT_FORM.equals(elementMatch.getContext())) {
selectFormNode(elementMatch);
try {
FormNode formNode = (FormNode) elementMatch.getGraphElement();
editor = FormTypeProvider.getFormType(formNode.getFormType()).openForm(elementMatch.getFile(), formNode);
} catch (CoreException e) {
PluginLogger.logError(e);
}
} else if (ElementMatch.CONTEXT_FORM_VALIDATION.equals(elementMatch.getContext())) {
selectFormNode(elementMatch);
try {
FormNode formNode = (FormNode) elementMatch.getGraphElement();
editor = FormTypeProvider.getFormType(formNode.getFormType())
Expand Down Expand Up @@ -143,4 +145,11 @@ protected void clear() {
contentProvider.clear();
}
}

private void selectFormNode(ElementMatch elementMatch) {
ProcessEditorBase processEditor = WorkspaceOperations.openProcessDefinition(elementMatch.getParent().getFile());
if (processEditor != null) {
processEditor.select(elementMatch.getParent().getGraphElement());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.Hyperlink;
import ru.runa.gpd.Activator;
import ru.runa.gpd.Localization;
import ru.runa.gpd.settings.PrefConstants;
import ru.runa.gpd.settings.WfeServerConnectorPreferenceNode;
import ru.runa.gpd.settings.WfeServerConnectorPreferencePage;
import ru.runa.gpd.settings.WfeServerConnectorsPreferenceNode;
import ru.runa.gpd.ui.custom.LoggingHyperlinkAdapter;
Expand All @@ -28,15 +30,18 @@ public class WfeServerConnectorComposite extends Composite {
private final WfeServerConnectorDataImporter<?> importer;
private final WfeServerConnectorSynchronizationCallback callback;
private Combo combo;
private Hyperlink addConnectionLink;
private Hyperlink settingsLink;
private Hyperlink synchronizeLink;

public WfeServerConnectorComposite(Composite parent, WfeServerConnectorDataImporter<?> importer, WfeServerConnectorSynchronizationCallback callback) {
super(parent, SWT.NONE);
this.importer = importer;
this.callback = callback;
setLayout(new GridLayout(3, true));
setLayout(new GridLayout(4, false));

createCombo();
createAddConnectionLink();
createConnectionSettingsLink();
createSynchronizeLink();
}
Expand All @@ -45,6 +50,7 @@ public WfeServerConnectorComposite(Composite parent, WfeServerConnectorDataImpor
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
combo.setEnabled(enabled);
addConnectionLink.setEnabled(enabled);
settingsLink.setEnabled(enabled);
synchronizeLink.setEnabled(enabled && WfeServerConnector.getInstance().isConfigured());
}
Expand Down Expand Up @@ -79,6 +85,33 @@ protected void onSelection(SelectionEvent e) throws Exception {
});
}

private void createAddConnectionLink() {
addConnectionLink = SwtUtils.createLink(this, Localization.getString("button.add.connection.server"), new LoggingHyperlinkAdapter() {

@Override
protected void onLinkActivated(HyperlinkEvent e) {
getShell().dispose();
openAddConnectionDialog();
}

});
}

private void openAddConnectionDialog() {
WfeServerConnectorsPreferenceNode wfeServerConnectorsNode = WfeServerConnectorsPreferenceNode.getInstance();
IPreferenceNode[] children = wfeServerConnectorsNode.getSubNodes();
WfeServerConnectorPreferenceNode lastNode = (WfeServerConnectorPreferenceNode) children[children.length - 1];
WfeServerConnectorPreferenceNode node = new WfeServerConnectorPreferenceNode(lastNode.getIndex() + 1);
wfeServerConnectorsNode.add(node);
wfeServerConnectorsNode.saveIndices();
WfeServerConnectorSettings connectorSettings = WfeServerConnectorSettings.createDefault(node.getIndex());
connectorSettings.saveToStore();
children = wfeServerConnectorsNode.getSubNodes();
lastNode = (WfeServerConnectorPreferenceNode) children[children.length - 1];
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, "gpd.pref.connector.wfe." + lastNode.getIndex(), null, null);
dialog.open();
}

private void createConnectionSettingsLink() {
settingsLink = SwtUtils.createLink(this, Localization.getString("button.ConnectionSettings"), new LoggingHyperlinkAdapter() {

Expand Down
Loading

0 comments on commit 79d07b5

Please sign in to comment.