Skip to content

Commit e788c9a

Browse files
committed
Fix issues found during regression tests
1 parent ac2d5b9 commit e788c9a

File tree

6 files changed

+16
-22
lines changed

6 files changed

+16
-22
lines changed

openapi-plugin/src/main/java/com/xliic/core/ui/components/JCheckBox.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ public class JCheckBox {
1111

1212
public JCheckBox(String label, JPanel parent) {
1313
this(label, parent.getComposite());
14-
Composite composite = parent.getComposite();
15-
checkBoxWidget = new Button(composite, SWT.CHECK | SWT.LEFT);
16-
checkBoxWidget.setFont(composite.getFont());
17-
checkBoxWidget.setText(label);
18-
checkBoxWidget.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
19-
checkBoxWidget.addDisposeListener(event -> checkBoxWidget = null);
2014
}
2115

2216
public JCheckBox(String label, Composite composite) {

openapi-plugin/src/main/java/com/xliic/core/util/IconLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public static Icon findIcon(@NotNull String path, @NotNull Class<?> aClass) {
1313
return new Icon(OpenAPIImages.PropertyNode);
1414
} else if (path.startsWith("/icons/add")) {
1515
return new Icon(OpenAPIImages.AddSnippet);
16+
} else if (path.startsWith("/icons/extref")) {
17+
return new Icon(OpenAPIImages.ExtRef);
1618
} else if (path.startsWith("/icons/icon_42crunch_platform")) {
1719
return new Icon(OpenAPIImages.Platform);
1820
} else if (path.startsWith("/icons/platform-all")) {

openapi-plugin/src/main/java/com/xliic/openapi/OpenAPIPerspectiveFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ public void defineLayout(IPageLayout layout) {
4646

4747
IFolderLayout d = layout.createFolder("d", IPageLayout.BOTTOM, (float) 0.675, editorArea);
4848
d.addView(ToolWindowId.OPEN_API_REPORT);
49+
d.addView(ToolWindowId.PLATFORM_DICTIONARY);
4950
}
5051
}

openapi-plugin/src/main/java/com/xliic/openapi/OpenAPIStartupActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ public void runActivity(@NotNull Project project) {
4747
// Platform
4848
PlatformService platformService = PlatformService.getInstance(project);
4949
PlatformConnection.setDefaultPlatformURL();
50+
// Eclipse Development Note: initialize to subscribe for settings update
51+
DictionaryService ddService = DictionaryService.getInstance(project);
5052
if (PlatformConnection.isPlatformUsed()) {
5153
platformService.createPlatformWindow(false);
52-
DictionaryService ddService = DictionaryService.getInstance(project);
5354
ddService.reload(false);
5455
}
5556
// Load KDB articles

openapi-plugin/src/main/java/com/xliic/openapi/preview/actions/PreviewAbstractAction.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ public PreviewAbstractAction() {
2323

2424
@Override
2525
public void actionPerformed(@NotNull Project project, @NotNull VirtualFile file) {
26+
String rootFileName = file.getPath();
27+
BundleService bundleService = BundleService.getInstance(project);
28+
BundleResult bundleResult = bundleService.getBundle(rootFileName);
29+
if (bundleResult == null) {
30+
return;
31+
}
32+
if (!bundleResult.isBundleComplete()) {
33+
bundleService.notifyOfErrors(rootFileName);
34+
return;
35+
}
2636
PreviewService previewService = PreviewService.getInstance();
2737
if (previewService.isServerStated()) {
2838
process(project, file);
@@ -52,16 +62,6 @@ public void setRejected() {
5262
public abstract void browse(Project project, VirtualFile file) throws MalformedURLException;
5363

5464
private void process(Project project, VirtualFile file) {
55-
String rootFileName = file.getPath();
56-
BundleService bundleService = BundleService.getInstance(project);
57-
BundleResult bundleResult = bundleService.getBundle(rootFileName);
58-
if (bundleResult == null) {
59-
return;
60-
}
61-
if (!bundleResult.isBundleComplete()) {
62-
bundleService.notifyOfErrors(rootFileName);
63-
return;
64-
}
6565
try {
6666
browse(project, file);
6767
} catch (MalformedURLException exception) {

openapi-plugin/src/main/java/com/xliic/openapi/report/tree/ReportFileObject.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ public String getFileName() {
2121

2222
public String getShortFileName(String projectPath) {
2323
if (issue.getUri() == null) {
24-
String shortName = issue.getFileName().replace(projectPath, "");
25-
if (shortName.startsWith("/")) {
26-
shortName = shortName.replaceFirst("/", "");
27-
}
28-
return shortName;
24+
return issue.getFileName().replace(projectPath, "");
2925
} else {
3026
return issue.getUri().toString();
3127
}

0 commit comments

Comments
 (0)