Skip to content

Commit

Permalink
git revert -m 2 814184bRevert "Merge remote-tracking branch 'apache/m…
Browse files Browse the repository at this point in the history
…aster' into ModernCode"

This reverts commit 814184b, reversing
changes made to 6408fe1.
  • Loading branch information
lkishalmi committed Sep 15, 2020
1 parent eba3ee2 commit ec0a7ae
Show file tree
Hide file tree
Showing 32 changed files with 606 additions and 818 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import org.netbeans.modules.apisupport.project.queries.AntArtifactProviderImpl;
import org.netbeans.modules.apisupport.project.queries.BinaryForSourceImpl;
import org.netbeans.modules.apisupport.project.queries.ClassPathProviderImpl;
import org.netbeans.modules.apisupport.project.queries.CompilerOptionsQueryImpl;
import org.netbeans.modules.apisupport.project.queries.FileEncodingQueryImpl;
import org.netbeans.modules.apisupport.project.queries.JavadocForBinaryImpl;
import org.netbeans.modules.apisupport.project.queries.ModuleProjectClassPathExtender;
Expand Down Expand Up @@ -286,7 +285,6 @@ private Lookup createLookup(ProjectInformation info, AuxiliaryConfiguration aux,
ic.add(fileBuilt);
ic.add(new AccessibilityQueryImpl(this));
ic.add(new SourceLevelQueryImpl(this));
ic.add(new CompilerOptionsQueryImpl(this));
//ic.add(new ProjectWhiteListQueryImplementation(this));
ic.add(new ProjectWhiteListQueryImplementation(this));
ic.add(new NbModulePackageModifierImplementation(this));
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions javafx/maven.htmlui/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.source=14
javac.target=1.8
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
is.autoload=true
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static class ArchetypeViewModel {
static void init(WizardData data,
Boolean android, Boolean ios, Boolean web, Boolean netbeans
) {
var nbHome = new File(System.getProperty("netbeans.home"));
File nbHome = new File(System.getProperty("netbeans.home"));
data.setNbhome(nbHome.getParent());

final ArchetypeData koArch = new ArchetypeData(
Expand Down Expand Up @@ -120,7 +120,7 @@ static void init(WizardData data,
);
data.getArchetypes().add(visArch);
data.setIosMoe(true);
var srvPath = Boolean.getBoolean("staging.archetypes") ? "stage" : "archetypes";
String srvPath = Boolean.getBoolean("staging.archetypes") ? "stage" : "archetypes";
data.loadArchetypes(srvPath);
data.setAndroidSdkPath(MavenUtilities.getDefault().readAndroidSdkPath());
}
Expand All @@ -142,7 +142,7 @@ static String archetypeVersion(ArchetypeData archetype) {

@ComputedProperty
static String archetypeOpen(ArchetypeData archetype) {
var sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
if (archetype != null) {
for (String item : archetype.getOpen()) {
if (sb.length() > 0) {
Expand Down Expand Up @@ -229,26 +229,29 @@ static void cleanWarning(WizardData data) {

@Function
static void chooseAndroidSDK(final WizardData data) {
EventQueue.invokeLater(() -> {
var b = new FileChooserBuilder(WizardData.class).
setSelectionApprover(new FileChooserBuilder.SelectionApprover() {
@Override
public boolean approve(File[] files) {
if (files.length != 1) {
return false;
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
FileChooserBuilder b = new FileChooserBuilder(WizardData.class).
setSelectionApprover(new FileChooserBuilder.SelectionApprover() {
@Override
public boolean approve(File[] files) {
if (files.length != 1) {
return false;
}
return isValidAndroidSdk(files[0]);
}
return isValidAndroidSdk(files[0]);
}
}).
setDirectoriesOnly(true);
if (data.getAndroidSdkPath() != null) {
b.setDefaultWorkingDirectory(new File(data.getAndroidSdkPath()));
}
var fc = b.createFileChooser();
int res = fc.showOpenDialog(null);
if (res == JFileChooser.APPROVE_OPTION) {
data.setAndroidSdkPath(fc.getSelectedFile().getPath());
MavenUtilities.getDefault().writeAndroidSdkPath(fc.getSelectedFile().getPath());
}).
setDirectoriesOnly(true);
if (data.getAndroidSdkPath() != null) {
b.setDefaultWorkingDirectory(new File(data.getAndroidSdkPath()));
}
JFileChooser fc = b.createFileChooser();
int res = fc.showOpenDialog(null);
if (res == JFileChooser.APPROVE_OPTION) {
data.setAndroidSdkPath(fc.getSelectedFile().getPath());
MavenUtilities.getDefault().writeAndroidSdkPath(fc.getSelectedFile().getPath());
}
}
});
}
Expand All @@ -260,7 +263,7 @@ private static boolean isValidAndroidSdk(File dir) {

@OnPropertyChange(value = "netbeans")
static void verifyNbInstallationDefined(WizardData data) {
var ok = !data.isNetbeans() || MavenUtilities.getDefault().readNetBeansInstallation() != null;
boolean ok = !data.isNetbeans() || MavenUtilities.getDefault().readNetBeansInstallation() != null;
data.setNbInstallationDefined(ok);
}

Expand All @@ -276,7 +279,7 @@ static void deviceSelected(WizardData data) {
private static final RequestProcessor DEVICES = new RequestProcessor("List iOS Devices");
@OnPropertyChange(value = "ios")
static void verifySimulator(WizardData data) {
var arr = data.getAvailableSimulators();
final List<Device> arr = data.getAvailableSimulators();
DEVICES.post(() -> {
DeviceType.listDevices(arr);
String selectedDevice = MavenUtilities.getDefault().readMoeDevice();
Expand All @@ -299,29 +302,32 @@ static void verifySimulator(WizardData data) {

@Function
static void defineNbInstallation(final WizardData data) {
EventQueue.invokeLater(() -> {
var b = new FileChooserBuilder(WizardData.class).
setSelectionApprover(new FileChooserBuilder.SelectionApprover() {
@Override
public boolean approve(File[] files) {
if (files.length != 1) {
return false;
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
FileChooserBuilder b = new FileChooserBuilder(WizardData.class).
setSelectionApprover(new FileChooserBuilder.SelectionApprover() {
@Override
public boolean approve(File[] files) {
if (files.length != 1) {
return false;
}
File platform = new File(files[0], "platform");
File lib = new File(platform, "lib");
File bootJar = new File(lib, "boot.jar");
return bootJar.exists();
}
File platform = new File(files[0], "platform");
File lib = new File(platform, "lib");
File bootJar = new File(lib, "boot.jar");
return bootJar.exists();
}
}).
setDirectoriesOnly(true);
var fc = b.createFileChooser();
var f = new File(System.getProperty("netbeans.home"));
fc.setCurrentDirectory(f);
int res = fc.showOpenDialog(null);
if (res == JFileChooser.APPROVE_OPTION) {
MavenUtilities.getDefault().writeNetBeansInstallation(f.getParent());
if (MavenUtilities.getDefault().readNetBeansInstallation() != null) {
data.setNbInstallationDefined(true);
}).
setDirectoriesOnly(true);
JFileChooser fc = b.createFileChooser();
File f = new File(System.getProperty("netbeans.home"));
fc.setCurrentDirectory(f);
int res = fc.showOpenDialog(null);
if (res == JFileChooser.APPROVE_OPTION) {
MavenUtilities.getDefault().writeNetBeansInstallation(f.getParent());
if (MavenUtilities.getDefault().readNetBeansInstallation() != null) {
data.setNbInstallationDefined(true);
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ private MacUtilities() {
})
static void listDevices(List<Device> collectTo) {
collectTo.clear();
var loading = new Device().assignId(ID_UNKNOWN).
Device loading = new Device().assignId(ID_UNKNOWN).
assignName(Bundle.MSG_Loading()).
assignInfo(Bundle.MSG_Loading());
collectTo.add(loading);

var pb = ProcessBuilder.getLocal();
ProcessBuilder pb = ProcessBuilder.getLocal();
pb.setExecutable("instruments");
pb.setArguments(Arrays.asList("-s", "devices"));
pb.setRedirectErrorStream(true);
Expand All @@ -75,7 +75,7 @@ static void listDevices(List<Device> collectTo) {
}


var is = p.getInputStream();
final InputStream is = p.getInputStream();
parseDevices(collectTo, is);
p.destroy();
collectTo.remove(loading);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ private String readProperty(final String tag) {
if (!this.settings.isFile()) {
return null;
}
var dbFactory = DocumentBuilderFactory.newInstance();
var dBuilder = dbFactory.newDocumentBuilder();
var settingsDoc = dBuilder.parse(this.settings);
var elementsByTagName = settingsDoc.getElementsByTagName(tag);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder;
dBuilder = dbFactory.newDocumentBuilder();
Document settingsDoc = dBuilder.parse(this.settings);
NodeList elementsByTagName = settingsDoc.getElementsByTagName(tag);
if (elementsByTagName.getLength() >0) return elementsByTagName.item(0).getTextContent();
return null;
} catch (NoSuchFileException ex) {
Expand Down
Loading

0 comments on commit ec0a7ae

Please sign in to comment.