-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed HTML4J and used plain old swing components.
Refactored the whole UI to go back to swing JDialog with a search field and a jlist.
- Loading branch information
Chris
committed
Jul 13, 2021
1 parent
6e6e7bb
commit 01145c8
Showing
159 changed files
with
856 additions
and
15,343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<actions> | ||
<action> | ||
<actionName>build</actionName> | ||
<packagings> | ||
<packaging>*</packaging> | ||
</packagings> | ||
<goals> | ||
<goal>install</goal> | ||
<goal>-T1C</goal> | ||
</goals> | ||
</action> | ||
<action> | ||
<actionName>rebuild</actionName> | ||
<packagings> | ||
<packaging>*</packaging> | ||
</packagings> | ||
<goals> | ||
<goal>clean</goal> | ||
<goal>install</goal> | ||
<goal>-T1C</goal> | ||
</goals> | ||
</action> | ||
</actions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/Installer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/model/LanguageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright 2021 Chris. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.chrisle.netbeans.plugins.nbscratchfile.model; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
import javax.swing.Icon; | ||
import javax.swing.ImageIcon; | ||
import org.chrisle.netbeans.plugins.nbscratchfile.CreateScratchFile; | ||
|
||
/** | ||
* | ||
* @author Chrl | ||
*/ | ||
public class LanguageType { | ||
|
||
private final String icon; | ||
private String languageName; | ||
private final String fileExt; | ||
private boolean isPluginRequired = false; | ||
|
||
public LanguageType(String languageName, String fileExt, boolean isPluginRequired) { | ||
this.icon = "".equals(fileExt) ? languageName.toLowerCase() : fileExt; | ||
this.languageName = languageName; | ||
this.fileExt = "".equals(fileExt) ? languageName.toLowerCase() : fileExt; | ||
this.isPluginRequired = isPluginRequired; | ||
} | ||
|
||
public String Icon() { | ||
return this.icon.toLowerCase(); | ||
} | ||
|
||
public Icon IconPath() throws IOException { | ||
URL resource = CreateScratchFile.class.getResource(String.format("icons/%s.png", this.fileExt)); | ||
|
||
if (resource != null) { | ||
return new ImageIcon(resource); | ||
} | ||
|
||
return new ImageIcon(); | ||
} | ||
|
||
public String LanguageLabel() { | ||
return String.format("%s (.%S) %s", this.languageName, this.fileExt, this.isPluginRequired ? "- plugin required" : ""); | ||
} | ||
|
||
public String LanguageName() { | ||
return this.languageName; | ||
} | ||
|
||
public void LanguageName(String value) { | ||
this.languageName = value; | ||
} | ||
|
||
public String FileExt() { | ||
return this.fileExt.toLowerCase(); | ||
} | ||
|
||
// public boolean IsPluginRequired() { | ||
// return this.isPluginRequired; | ||
// } | ||
public void setExt(LanguageType languageType) { | ||
// NbScratchFileViewModel.setExt(languageType.FileExt, languageType.LanguageLabel); | ||
} | ||
|
||
// public showPluginRequiredMessage(): string { | ||
// return this.isPluginRequired ? ' - plugin is required' : ''; | ||
// } | ||
} |
Oops, something went wrong.