Browse Source

Merge branch 'release/10.0' of ssh://cloud.finedevelop.com:7999/~hzzz/design61 into release/10.0

master
hzzz 6 years ago
parent
commit
5c52e95e45
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java
  3. 12
      designer-realize/src/main/java/com/fr/start/Designer.java

11
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1026,16 +1026,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
*/ */
private void activeTemplate(FILE tplFile, JTemplate jt) { private void activeTemplate(FILE tplFile, JTemplate jt) {
// 如果该模板已经打开,则进行激活就可以了 // 如果该模板已经打开,则进行激活就可以了
String fullName = StableUtils.pathJoin(new String[]{ProjectConstants.REPORTLETS_NAME, tplFile.getName()}); int index = HistoryTemplateListPane.getInstance().contains(tplFile.getPath());
if (tplFile instanceof FileNodeFILE) {
fullName = ((FileNodeFILE) tplFile).getEnvPath() + "/" + tplFile.getPath();
}
// 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行
if (tplFile instanceof FileFILE) {
fullName = tplFile.getPath();
}
fullName = OperatingSystem.isWindows() ? fullName.replaceAll("/", "\\\\") : fullName.replaceAll("\\\\", "/");
int index = HistoryTemplateListPane.getInstance().contains(fullName);
List<JTemplate<?, ?>> historyList = HistoryTemplateListPane.getInstance().getHistoryList(); List<JTemplate<?, ?>> historyList = HistoryTemplateListPane.getInstance().getHistoryList();
if (index != -1) { if (index != -1) {
historyList.get(index).activeJTemplate(index, jt); historyList.get(index).activeJTemplate(index, jt);

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java

@ -22,8 +22,8 @@ public class FileModel extends AlphaCellModel {
public FileModel(String name, String filePath) { public FileModel(String name, String filePath) {
super(name, null, CellType.FILE); super(name, null, CellType.FILE);
this.filePath = filePath; this.filePath = filePath.replaceAll("\\\\", "/");
setDescription(AlphaFineHelper.findFolderName(filePath)); setDescription(AlphaFineHelper.findFolderName(this.filePath));
} }
public String getFilePath() { public String getFilePath() {

12
designer-realize/src/main/java/com/fr/start/Designer.java

@ -42,7 +42,6 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.module.Module; import com.fr.module.Module;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import com.fr.record.analyzer.FineAnalyzer;
import com.fr.stable.BuildContext; import com.fr.stable.BuildContext;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -56,14 +55,9 @@ import com.fr.start.preload.ImagePreLoader;
import com.fr.start.server.ServerTray; import com.fr.start.server.ServerTray;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import javax.swing.JComponent; import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.border.MatteBorder; import javax.swing.border.MatteBorder;
import java.awt.Component; import java.awt.*;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.File; import java.io.File;
@ -96,8 +90,6 @@ public class Designer extends BaseDesigner {
*/ */
public static void main(String[] args) { public static void main(String[] args) {
FineAnalyzer.init();
BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); BuildContext.setBuildFilePath("/com/fr/stable/build.properties");

Loading…
Cancel
Save