Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSergey committed Dec 24, 2020
2 parents 16f4f5b + 3a3b456 commit 69dda8a
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 31 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@
---
**Плагин совместим с версиями 1C:EDT, установленными через 1C:EDT Starter**

Тестировался на версиях 1.16 - 2020.5
Тестировался на версиях 1.16 - 2020.6

Таблица совместимости версий плагина с версиями EDT:
Версия EDT |Версия плагина
------------- |-------------
1.16 - 2020.5 |1.0.0 - 1.2.0
2020.6 |1.3.0

---
### Сборка из исходников:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="ru.yanygin.dt.cfbuilder.plugin.ui.feature"
label="%feature.name"
version="1.2.0.qualifier"
version="1.3.0.qualifier"
provider-name="%feature.vendor">

<description>
Expand Down
36 changes: 18 additions & 18 deletions bundles/ru.yanygin.dt.cfbuilder.plugin.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: ru.yanygin.dt.cfbuilder.plugin.ui;singleton:=true
Bundle-Version: 1.2.0.qualifier
Bundle-Version: 1.3.0.qualifier
Bundle-Activator: ru.yanygin.dt.cfbuilder.plugin.ui.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.xtext.ui;bundle-version="2.18.0",
com._1c.g5.v8.dt.platform;bundle-version="6.3.100",
com._1c.g5.v8.dt.platform.services.core;bundle-version="10.3.0",
com._1c.g5.v8.dt.platform.services.model;bundle-version="5.0.500",
com._1c.g5.v8.dt.platform.services.ui;bundle-version="8.1.200",
com._1c.g5.v8.dt.export;bundle-version="6.0.100",
com._1c.g5.v8.dt.import;bundle-version="7.2.200",
com._1c.g5.v8.dt.import.xml;bundle-version="9.0.100",
com._1c.g5.v8.dt.metadata,
com._1c.g5.v8.dt.metadata.extension;bundle-version="1.4.0",
com._1c.g5.v8.dt.core;bundle-version="11.1.0",
com._1c.g5.wiring;bundle-version="2.2.0",
com._1c.g5.v8.dt.compare.ui;bundle-version="11.0.0",
com._1c.g5.v8.dt.common;bundle-version="6.1.0",
com._1c.g5.designer.ssh.client;bundle-version="0.3.0",
com._1c.g5.v8.dt.core.xtext;bundle-version="2.0.1700",
com._1c.g5.v8.dt.ui;bundle-version="14.1.0"
org.eclipse.xtext.ui;bundle-version="[2.0.0,3.0.0)",
com._1c.g5.v8.dt.platform;bundle-version="[7.0.0,8.0.0)",
com._1c.g5.v8.dt.platform.services.core;bundle-version="[13.0.0,14.0.0)",
com._1c.g5.v8.dt.platform.services.model;bundle-version="[5.1.0,6.0.0)",
com._1c.g5.v8.dt.platform.services.ui;bundle-version="[9.2.0,10.0.0)",
com._1c.g5.v8.dt.export;bundle-version="[6.0.100,7.0.0)",
com._1c.g5.v8.dt.import;bundle-version="[7.2.200,8.0.0)",
com._1c.g5.v8.dt.import.xml;bundle-version="[10.2.0,11.0.0)",
com._1c.g5.v8.dt.metadata;bundle-version="[12.2.0,13.0.0)",
com._1c.g5.v8.dt.metadata.extension;bundle-version="[1.7.0,2.0.0)",
com._1c.g5.v8.dt.core;bundle-version="[16.0.0,17.0.0)",
com._1c.g5.wiring;bundle-version="[2.3.0,3.0.0)",
com._1c.g5.v8.dt.compare.ui;bundle-version="[16.0.0,17.0.0)",
com._1c.g5.v8.dt.common;bundle-version="[8.1.0,9.0.0)",
com._1c.g5.designer.ssh.client;bundle-version="[0.3.0,1.0.0)",
com._1c.g5.v8.dt.core.xtext;bundle-version="[2.0.1700,3.0.0)",
com._1c.g5.v8.dt.ui;bundle-version="[15.1.0,16.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: ru.yanygin.dt.cfbuilder.plugin.ui
Bundle-ActivationPolicy: lazy
Expand Down
4 changes: 2 additions & 2 deletions bundles/ru.yanygin.dt.cfbuilder.plugin.ui/plugin.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
#Properties file for com.e1c.dt.bsl.stringliteraltype.ui

command.BuildCf.name = Build from the project a CF/CFE-file
command.ImportCf.name = Import project from a CF/CFE-file
command.BuildCf.name = Build a CF/CFE-file
command.ImportCf.name = Import from CF/CFE-file

pluginName = 1C:EDT CF builder

Expand Down
2 changes: 1 addition & 1 deletion bundles/ru.yanygin.dt.cfbuilder.plugin.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
allPopups="false"
locationURI="menu:file?endof=export">
<command
commandId="ru.yanygin.dt.cfbuilder.plugin.ui.importcf"
commandId="ru.yanygin.dt.cfbuilder.plugin.ui.buildcf"
icon="icons/cf16.png"
label="%command.BuildCf.name"
style="push">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

command.BuildCf.name = \u0421\u043E\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 CF/CFE-\u0444\u0430\u0439\u043B
command.ImportCf.name = \u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442 \u0438\u0437 CF/CFE-\u0444\u0430\u0439\u043B\u0430
command.BuildCf.name = \u0421\u043E\u0431\u0440\u0430\u0442\u044C CF/CFE-\u0444\u0430\u0439\u043B
command.ImportCf.name = \u0418\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437 CF/CFE-\u0444\u0430\u0439\u043B\u0430

pluginName = 1C:EDT CF builder

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package ru.yanygin.dt.cfbuilder.plugin.ui;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.service.prefs.Preferences;

import com.google.inject.Guice;
import com.google.inject.Injector;
Expand Down Expand Up @@ -86,4 +89,8 @@ public static IStatus createErrorStatus(Throwable throwable) {
public static void log(IStatus status) {
plugin.getLog().log(status);
}

public Preferences getPreferenceStore(IProject project) {
return InstanceScope.INSTANCE.getNode(PLUGIN_ID).node(project.getName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ private void exportConfigurationToCf(ProjectInfo destinationFile, IProgressMonit

private void exportConfigurationToCfSimple(ProjectInfo destinationFile) throws RuntimeExecutionException {

v8Launcher.second.exportConfigurationToCf(v8Launcher.first, projectInfo.getDeploymentInfobase(),
buildArguments(projectInfo.getDeploymentInfobase()), destinationFile.getPath());
v8Launcher.second.exportConfigurationToFile(v8Launcher.first, projectInfo.getDeploymentInfobase(),
buildArguments(projectInfo.getDeploymentInfobase()), null, destinationFile.getPath());

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.wb.swt.ResourceManager;
import org.osgi.service.prefs.Preferences;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.DisposeEvent;

Expand Down Expand Up @@ -158,6 +159,7 @@ private void addEventHandlers() {
public void modifyText(ModifyEvent e) {

selectProjectFromProjectList();
setDefaultFilePath();
changeSelectedFileNameExtension();
setV8RuntimeCurrentVersion();

Expand Down Expand Up @@ -852,7 +854,8 @@ protected void createButtonsForButtonBar(Composite parent) {
buttonOK.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {

saveDefaultFilePath();

ProjectInfo fileInfo = new ProjectInfo(selectedFileName, deployInTempIB, selectedInfobase,
associateAfterDeploy, createDistributionFile);

Expand Down Expand Up @@ -904,6 +907,8 @@ public void run(IProgressMonitor monitor) throws InterruptedException {
});

createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

setDefaultFilePath();
}

private void setButtonOKEnabled() {
Expand Down Expand Up @@ -971,4 +976,24 @@ public static Font getDefaultFont() {
return new Font(Display.getCurrent(), fontData);
}

public void setDefaultFilePath() {

if (projectRef == null) {
return;
}
Preferences store = Activator.getDefault().getPreferenceStore(projectRef);
String defaultFilePath = store.get(dialogType.toString().concat("_DefaultFilePath"), "");

if (!defaultFilePath.isBlank()) {
this.txtFilePath.setText(defaultFilePath);
}

}

public void saveDefaultFilePath() {

Preferences store = Activator.getDefault().getPreferenceStore(projectRef);
store.put(dialogType.toString().concat("_DefaultFilePath"), selectedFileName);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.RuntimeExecutionCommandBuilder;
import com._1c.g5.v8.dt.platform.services.model.InfobaseAccess;
import com._1c.g5.v8.dt.platform.services.model.InfobaseReference;
import com._1c.g5.v8.dt.platform.services.model.RuntimeInstallation;
import com.google.common.base.Strings;

public class V8ExtendedLauncher extends AbstractRuntimeComponentExecutor {
Expand All @@ -35,7 +36,7 @@ public String executeRuntimeProcessCommandEx(RuntimeExecutionCommandBuilder comm
addAuthentication(command, arguments);

closeDesignerSession(arguments, infobase);
return super.executeRuntimeProcessCommand(command, v8Launcher.first.getInstallation());
return super.executeRuntimeProcessCommand(command, v8Launcher.first.getInstallation(), infobase, arguments);

}

Expand Down Expand Up @@ -67,7 +68,7 @@ protected File createTempFile() throws IOException {
}

@Override
protected String readRuntimeLog(File logFile) throws IOException {
protected String readRuntimeLog(File logFile, RuntimeInstallation installation) throws IOException {
return readOutLogFile(logFile);
}

Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.host.url=https://sonarcloud.io
sonar.projectKey=YanSergey_EDT_CF_Builder
sonar.projectName=EDT CF Builder
sonar.projectVersion=1.2.0
sonar.projectVersion=1.3.0
sonar.sources=.
sonar.sourceEncoding=UTF-8
sonar.java.binaries=./bundles/ru.yanygin.dt.cfbuilder.plugin.ui/bin/

0 comments on commit 69dda8a

Please sign in to comment.