Merge pull request #4506 from apache/delivery
Sync delivery to release150 for 15-rc4
diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProject.java b/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProject.java
index d0b5d12..447d40c 100644
--- a/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProject.java
+++ b/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProject.java
@@ -267,16 +267,18 @@
}
/**
- * Returns {@code true} if all configurations are resolved.
- * @return true - if all configurations are resolved.
+ * Returns {@code true} if all resolvable configurations are resolved.
+ * @return true - if all resolvable configurations are resolved.
*/
public boolean isResolved() {
if (resolved == null) {
boolean b = true;
for (GradleConfiguration value : configurations.values()) {
- b &= value.isResolved();
- if (!b) {
- break;
+ if (value.isCanBeResolved()) {
+ b &= value.isResolved();
+ if (!b) {
+ break;
+ }
}
}
resolved = b;
diff --git a/ide/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java b/ide/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
index d87a45b..6851618 100644
--- a/ide/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
+++ b/ide/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
@@ -356,14 +356,16 @@
}
logFine("urlstr:", urlStr); // NOI18N
- StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage (NbDdeBrowserImpl.class, "MSG_activatingBrowser"));
- try {
- task.browser.reqDdeMessage(task.browser.realDDEServer(),WWW_ACTIVATE,"-1,0x0",task.browser.getActivateTimeout());
- } catch (NbBrowserException ex) {
- logFine("Exception, gonna start browser:", ex);
- triedStart = true;
- startBrowser(task.browser.extBrowserFactory.getBrowserExecutable(), urlStr);
- }
+ if (!win9xHack(task.browser.realDDEServer())) {
+ StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage (NbDdeBrowserImpl.class, "MSG_activatingBrowser"));
+ try {
+ task.browser.reqDdeMessage(task.browser.realDDEServer(),WWW_ACTIVATE,"-1,0x0",task.browser.getActivateTimeout());
+ } catch (NbBrowserException ex) {
+ logFine("Exception, gonna start browser:", ex);
+ triedStart = true;
+ startBrowser(task.browser.extBrowserFactory.getBrowserExecutable(), urlStr);
+ }
+ }
logFine("firstpart"); // NOI18N
if (!triedStart) {
@@ -443,6 +445,15 @@
return url;
}
+ /**
+ * Checks for IExplorer & Win9x combination.
+ */
+ private boolean win9xHack (String browser) {
+ return browser.equals(ExtWebBrowser.IEXPLORE)
+ && (Utilities.getOperatingSystem() == Utilities.OS_WIN98
+ || Utilities.getOperatingSystem() == Utilities.OS_WIN95);
+ }
+
/**
* Utility function that tries to start new browser process.
*
diff --git a/ide/xml.text.obsolete90/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass b/ide/xml.text.obsolete90/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
index a2cae95..5a92471 100644
--- a/ide/xml.text.obsolete90/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
+++ b/ide/xml.text.obsolete90/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
@@ -748,7 +748,7 @@
<!-- possibly after filtering for duplicates or something like this. -->
<!-- Timeout is ten minutes; should be enough for valid start, while preventing -->
<!-- a deadlock from hanging an automated build: -->
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
@@ -828,7 +828,7 @@
>
<property name="tryme.debug.args" value="" />
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
diff --git a/ide/xml.text.obsolete90/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml b/ide/xml.text.obsolete90/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
index 56064a2..defab19 100644
--- a/ide/xml.text.obsolete90/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
+++ b/ide/xml.text.obsolete90/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
@@ -748,7 +748,7 @@
<!-- possibly after filtering for duplicates or something like this. -->
<!-- Timeout is ten minutes; should be enough for valid start, while preventing -->
<!-- a deadlock from hanging an automated build: -->
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
@@ -828,7 +828,7 @@
>
<property name="tryme.debug.args" value="" />
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
diff --git a/ide/xml.text/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass b/ide/xml.text/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
index 25eb5bd..aba7482 100644
--- a/ide/xml.text/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
+++ b/ide/xml.text/test/unit/data/goldenfiles/org/netbeans/modules/xml/text/indent/XMLFormatterTest/testReformatSample2.pass
@@ -748,7 +748,7 @@
<!-- possibly after filtering for duplicates or something like this. -->
<!-- Timeout is ten minutes; should be enough for valid start, while preventing -->
<!-- a deadlock from hanging an automated build: -->
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
@@ -828,7 +828,7 @@
>
<property name="tryme.debug.args" value="" />
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
diff --git a/ide/xml.text/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml b/ide/xml.text/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
index d8c35dc..f925358 100644
--- a/ide/xml.text/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
+++ b/ide/xml.text/test/unit/data/input/XMLFormatterTest/testReformat/netbeans_build.xml
@@ -748,7 +748,7 @@
<!-- possibly after filtering for duplicates or something like this. -->
<!-- Timeout is ten minutes; should be enough for valid start, while preventing -->
<!-- a deadlock from hanging an automated build: -->
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
@@ -828,7 +828,7 @@
>
<property name="tryme.debug.args" value="" />
- <exec os="Windows NT Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
<arg value="--jdkhome"/>
<arg file="${nbjdk.home}"/>
<arg value="--userdir"/>
diff --git a/java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java b/java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
index f88ae04..9224475 100644
--- a/java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
+++ b/java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
@@ -3380,6 +3380,8 @@
addAllStaticMemberNames(env);
}
final TypeElement enclClass = scope.getEnclosingClass();
+ List<ExecutableElement> methodsIn = null;
+
for (Element e : locals) {
switch (simplifyElementKind(e.getKind())) {
case ENUM_CONSTANT:
@@ -3399,8 +3401,11 @@
}
break;
case METHOD:
+ if (methodsIn == null) {
+ methodsIn = ElementFilter.methodsIn(locals);
+ }
ExecutableType et = (ExecutableType) asMemberOf(e, enclClass != null ? enclClass.asType() : null, types);
- if (e.getEnclosingElement() != enclClass && conflictsWithLocal(e.getSimpleName(), enclClass, locals)) {
+ if (e.getEnclosingElement() != enclClass && conflictsWithLocalMethods(e.getSimpleName(), enclClass, methodsIn)) {
results.add(itemFactory.createStaticMemberItem(env.getController(), (DeclaredType)e.getEnclosingElement().asType(), e, et, false, anchorOffset, elements.isDeprecated(e), env.addSemicolon()));
} else {
results.add(itemFactory.createExecutableItem(env.getController(), (ExecutableElement) e, et, anchorOffset, null, env.getScope().getEnclosingClass() != e.getEnclosingElement(), elements.isDeprecated(e), false, env.addSemicolon(), isOfSmartType(env, getCorrectedReturnType(env, et, (ExecutableElement) e, enclClass != null ? enclClass.asType() : null), smartTypes), env.assignToVarPos(), false));
@@ -6216,9 +6221,9 @@
}
return false;
}
-
- private boolean conflictsWithLocal(Name name, TypeElement enclClass, Iterable<? extends Element> locals) {
- for (ExecutableElement local : ElementFilter.methodsIn(locals)) {
+
+ private static boolean conflictsWithLocalMethods(Name name, TypeElement enclClass, List<ExecutableElement> methodsIn) {
+ for (ExecutableElement local : methodsIn) {
if (local.getEnclosingElement() == enclClass && name.contentEquals(local.getSimpleName())) {
return true;
}
diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java b/java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java
index 7cb214e..23ac810 100644
--- a/java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java
+++ b/java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java
@@ -19,6 +19,7 @@
package org.netbeans.modules.java.hints.bugs;
import com.sun.source.tree.Tree.Kind;
+import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.lang.model.element.ElementKind;
@@ -46,11 +47,18 @@
@TriggerTreeKind(Kind.COMPILATION_UNIT)
public static List<ErrorDescription> unused(HintContext ctx) {
- return UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled())
- .stream()
- .map(ud -> convertUnused(ctx, ud))
- .filter(err -> err != null)
- .collect(Collectors.toList());
+ List<UnusedDescription> unused = UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled());
+ List<ErrorDescription> result = new ArrayList<>(unused.size());
+ for (UnusedDescription ud : unused) {
+ if (ctx.isCanceled()) {
+ break;
+ }
+ ErrorDescription err = convertUnused(ctx, ud);
+ if (err != null) {
+ result.add(err);
+ }
+ }
+ return result;
}
@Messages({
diff --git a/java/performance/sparrow/build.xml b/java/performance/sparrow/build.xml
index 2836ce0..01db477 100644
--- a/java/performance/sparrow/build.xml
+++ b/java/performance/sparrow/build.xml
@@ -112,7 +112,7 @@
depends="create-userdir,add-userdir">
<echo>Warmup 1 - running IDE once to prime disk and memory caches and create userdir</echo>
- <exec os="Windows NT Windows 2000 Windows XP"
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows XP"
executable="${netbeans.home}/bin/runide.exe" failonerror="yes" timeout="600000">
<arg value="-J-Dnetbeans.close=true"/>
</exec>
@@ -123,7 +123,7 @@
</exec>
<echo>Warmup 2 - running IDE a second time prime disk and memory caches and create userdir</echo>
- <exec os="Windows NT Windows 2000 Windows XP"
+ <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows XP"
executable="${netbeans.home}/bin/runide.exe" failonerror="yes" timeout="600000">
<arg value="-J-Dnetbeans.close=true"/>
</exec>
@@ -305,7 +305,7 @@
<target name="runide-freshuserdir" depends="delete-userdir,create-userdir,runide" />
<target name="runide" description="Start the IDE with the userdir specified in the userdir property">
-<exec os="Windows NT Windows 2000 Windows XP"
+<exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows XP"
executable="${netbeans.home}/bin/runide.exe" failonerror="yes" timeout="600000"
output="${gclog}_${index}">
</exec>
diff --git a/nb/ide.branding/o.n.core/src/org/netbeans/core/Bundle_nb.properties b/nb/ide.branding/o.n.core/src/org/netbeans/core/Bundle_nb.properties
index bccab0c..8529024 100644
--- a/nb/ide.branding/o.n.core/src/org/netbeans/core/Bundle_nb.properties
+++ b/nb/ide.branding/o.n.core/src/org/netbeans/core/Bundle_nb.properties
@@ -18,9 +18,10 @@
# {0} - class name of exception
# {1} - path to system folder
NTF_ExceptionalException=\
- A {0} exception has occurred.\n\
- Please report this at https://netbeans.apache.org/nb/report-issue,\n\
- including a copy of your messages.log file as an attachment.\n\
- The messages.log file is located in your {1} folder.
+ A <code>{0}</code> has occurred.<br/><br/>\
+ If you are running the <a href="https://netbeans.apache.org/download">latest</a> version of NetBeans you can \
+ <a href="https://netbeans.apache.org/nb/report-issue">report this</a>, \
+ including a copy of your messages.log file as an attachment.<br/><br/>\
+ The messages.log file is located in <a href="{1}">this folder</a>.
-NTF_ExceptionalExceptionReport=Show and Report Problem to NetBeans Team
+NTF_ExceptionalExceptionReport=Show Details
diff --git a/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh b/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh
index f1d21cc..d91007e 100644
--- a/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh
+++ b/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh
@@ -28,7 +28,7 @@
appSigningIdentity="$1"
appDir="$2"
-nativeExecutionBinaries=( "/netbeans/ide/bin/nativeexecution/MacOSX-x86/unbuffer.dylib" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/pty" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/pty_open" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/process_start" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/killall" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/stat" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/unbuffer.dylib" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/pty" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/pty_open" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/process_start" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/killall" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/stat")
+nativeExecutionBinaries=( "/netbeans/ide/bin/nativeexecution/MacOSX-x86/unbuffer.dylib" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/pty" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/pty_open" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/process_start" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/killall" "/netbeans/ide/bin/nativeexecution/MacOSX-x86/stat" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/unbuffer.dylib" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/pty" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/pty_open" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/process_start" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/killall" "/netbeans/ide/bin/nativeexecution/MacOSX-x86_64/stat" "/netbeans/ide/modules/lib/aarch64/libjunixsocket-native-2.5.1.dylib" "/netbeans/ide/modules/lib/x86_64/libjunixsocket-native-2.5.1.dylib")
jniBinaries=("/netbeans/platform/modules/lib/aarch64/libjnidispatch-nb.jnilib" "/netbeans/platform/modules/lib/x86_64/libjnidispatch-nb.jnilib")
profilerBinaries=("/netbeans/profiler/lib/deployed/jdk16/mac/libprofilerinterface.jnilib" "/netbeans/profiler/lib/deployed/jdk15/mac/libprofilerinterface.jnilib" )
jansiJar="/netbeans/java/maven/lib/jansi-2.4.0.jar"
diff --git a/nbi/engine/native/launcher/windows/src/ExtractUtils.c b/nbi/engine/native/launcher/windows/src/ExtractUtils.c
index 5eb8316..edbfa55 100644
--- a/nbi/engine/native/launcher/windows/src/ExtractUtils.c
+++ b/nbi/engine/native/launcher/windows/src/ExtractUtils.c
@@ -60,6 +60,7 @@
WCHAR * os;
props->status = EXIT_CODE_STUB;
os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
+ if(is9x()) os = appendStringW(os, L"Windows 9x");
if(isNT()) os = appendStringW(os, L"Windows NT");
if(is2k()) os = appendStringW(os, L"Windows 2000");
if(isXP()) os = appendStringW(os, L"Windows XP");
diff --git a/nbi/engine/native/launcher/windows/src/Main.c b/nbi/engine/native/launcher/windows/src/Main.c
index e7b7b75..5a819ee 100644
--- a/nbi/engine/native/launcher/windows/src/Main.c
+++ b/nbi/engine/native/launcher/windows/src/Main.c
@@ -634,22 +634,27 @@
globalInstance = hInstance;
UNREFERENCED_PARAMETER(lpCmdLine);
initWow64();
- if(!createEvents()) {
- status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
+ if(is9x()) {
+ MessageBoxA(0, "Windows 9X platform is not supported", "Message", MB_OK);
+ status = EXIT_CODE_SYSTEM_ERROR;
} else {
- LauncherProperties * props = createLauncherProperties();
- createLauncherThread(props);
- if(!createGui(props, hInstance, hi, nCmdShow)) {
- status = EXIT_CODE_GUI_INITIALIZATION_ERROR;
+ if(!createEvents()) {
+ status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
} else {
- messageLoop(props);
- WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+ LauncherProperties * props = createLauncherProperties();
+ createLauncherThread(props);
+ if(!createGui(props, hInstance, hi, nCmdShow)) {
+ status = EXIT_CODE_GUI_INITIALIZATION_ERROR;
+ } else {
+ messageLoop(props);
+ WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+ }
+
+ status = props->status;
+ exitCode = props->exitCode;
+ printStatus(props);
+ freeLauncherProperties(&props);
}
-
- status = props->status;
- exitCode = props->exitCode;
- printStatus(props);
- freeLauncherProperties(&props);
}
FREE(currentProgressSize);
FREE(totalProgressSize);
diff --git a/nbi/engine/native/launcher/windows/src/SystemUtils.c b/nbi/engine/native/launcher/windows/src/SystemUtils.c
index 983ea13..c8b423e 100644
--- a/nbi/engine/native/launcher/windows/src/SystemUtils.c
+++ b/nbi/engine/native/launcher/windows/src/SystemUtils.c
@@ -36,6 +36,11 @@
return;
}
+DWORD is9x() {
+ DWORD id, major, minor, type;
+ getOSVersion(& id, & major, & minor, & type);
+ return (id == VER_PLATFORM_WIN32_WINDOWS) ? 1 : 0;
+}
DWORD isNT() {
DWORD id, major, minor, type;
getOSVersion(& id, & major, & minor, & type);
diff --git a/nbi/engine/native/launcher/windows/src/SystemUtils.h b/nbi/engine/native/launcher/windows/src/SystemUtils.h
index bdbffc5..69437f8 100644
--- a/nbi/engine/native/launcher/windows/src/SystemUtils.h
+++ b/nbi/engine/native/launcher/windows/src/SystemUtils.h
@@ -24,6 +24,7 @@
extern "C" {
#endif
+DWORD is9x();
DWORD isNT();
DWORD isXP();
DWORD is2k();
diff --git a/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java b/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java
index 7f94e09..0bd8545 100644
--- a/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java
+++ b/platform/core.output2/src/org/netbeans/core/output2/OutWriter.java
@@ -52,7 +52,11 @@
private boolean disposeOnClose = false;
- private static final boolean USE_HEAP_STORAGE = Boolean.getBoolean("nb.output.heap");
+ //IZ 44375 - Memory mapping fails with bad file handle on win 98
+ private static final boolean USE_HEAP_STORAGE =
+ Boolean.getBoolean("nb.output.heap") || Utilities.getOperatingSystem() == //NOI18N
+ Utilities.OS_WIN98 ||
+ Utilities.getOperatingSystem() == Utilities.OS_WIN95;
/**
* Byte array used to write the line separator after line writes.
diff --git a/platform/o.n.core/src/org/netbeans/core/Bundle.properties b/platform/o.n.core/src/org/netbeans/core/Bundle.properties
index 4a8da95..18db398 100644
--- a/platform/o.n.core/src/org/netbeans/core/Bundle.properties
+++ b/platform/o.n.core/src/org/netbeans/core/Bundle.properties
@@ -28,13 +28,13 @@
# {0} - class name of exception
# {1} - path to system folder
NTF_ExceptionalException=\
- A {0} exception has occurred.\n\
-\tClick Show Details or see the messages.log file located in your {1} folder.
+ A {0} exception has occurred.<br/><br/>\
+ Click Show Details or see the messages.log file located in your {1} folder.
NTF_ExceptionalExceptionTitle=Unexpected Exception
# {0} - class name of exception
NTF_ExceptionWarning=\
- A {0} exception has occurred.\n\
- However, the system should continue working without further problems.\n\
+ A {0} exception has occurred.<br/><br/>\
+ However, the system should continue working without further problems.<br/><br/>\
Click Show Details for the stack trace.
NTF_ExceptionWarningTitle=Warning
diff --git a/platform/o.n.core/src/org/netbeans/core/NotifyExcPanel.java b/platform/o.n.core/src/org/netbeans/core/NotifyExcPanel.java
index f2417e0..a809f09 100644
--- a/platform/o.n.core/src/org/netbeans/core/NotifyExcPanel.java
+++ b/platform/o.n.core/src/org/netbeans/core/NotifyExcPanel.java
@@ -21,6 +21,7 @@
import java.awt.BorderLayout;
import java.awt.Cursor;
+import java.awt.Desktop;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.EventQueue;
@@ -38,6 +39,9 @@
import java.io.StringWriter;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.net.URISyntaxException;
+import java.nio.file.Paths;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.ResourceBundle;
import java.util.concurrent.Callable;
@@ -54,10 +58,12 @@
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
import javax.swing.JTextPane;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.UIManager;
+import javax.swing.event.HyperlinkEvent;
import org.netbeans.core.startup.CLIOptions;
import org.openide.DialogDescriptor;
import org.openide.DialogDisplayer;
@@ -87,7 +93,7 @@
/** preferred width of this component */
private static final int SIZE_PREFERRED_WIDTH=550;
/** preferred height of this component */
- private static final int SIZE_PREFERRED_HEIGHT=250;
+ private static final int SIZE_PREFERRED_HEIGHT=350;
private static final int MAX_STORED_EXCEPTIONS = 500;
private static final boolean AUTO_FOCUS = Boolean.getBoolean("netbeans.winsys.auto_focus"); // NOI18N
@@ -107,7 +113,7 @@
/** details button */
private JButton details;
/** details window */
- private JTextPane output;
+ private JTextArea output;
/** boolean to show/hide details */
private static boolean showDetails;
@@ -131,12 +137,13 @@
details = new JButton ();
details.setDefaultCapable (false);
- output = new JTextPane() {
+ output = new JTextArea() {
public @Override boolean getScrollableTracksViewportWidth() {
return false;
}
};
output.setEditable(false);
+ output.setLineWrap(false);
Font f = output.getFont();
output.setFont(new Font("Monospaced", Font.PLAIN, null == f ? 12 : f.getSize() + 1)); // NOI18N
output.setForeground(UIManager.getColor("Label.foreground")); // NOI18N
@@ -484,32 +491,41 @@
}
} else {
ResourceBundle curBundle = NbBundle.getBundle (NotifyExcPanel.class);
+ String message;
if (current.getSeverity() == Level.WARNING) {
// less scary message for warning level
- descriptor.setMessage (
- java.text.MessageFormat.format(
- curBundle.getString("NTF_ExceptionWarning"),
- new Object[] {
- current.getClassName ()
- }
- )
+ message = MessageFormat.format(
+ curBundle.getString("NTF_ExceptionWarning"),
+ new Object[] { current.getClassName() }
);
title = curBundle.getString("NTF_ExceptionWarningTitle"); // NOI18N
} else {
- // emphasize user-non-friendly exceptions
- // if (this.getMessage() == null || "".equals(this.getMessage())) { // NOI18N
- descriptor.setMessage (
- java.text.MessageFormat.format(
- curBundle.getString("NTF_ExceptionalException"),
- new Object[] {
- current.getClassName (),
- CLIOptions.getLogDir ()
- }
- )
+ message = MessageFormat.format(
+ curBundle.getString("NTF_ExceptionalException"),
+ new Object[] { current.getClassName(), Paths.get(CLIOptions.getLogDir()).toUri() }
);
-
title = curBundle.getString("NTF_ExceptionalExceptionTitle"); // NOI18N
}
+ JTextPane pane = new JTextPane();
+ pane.setContentType("text/html"); // NOI18N
+ pane.setText(message);
+ pane.setBackground(UIManager.getColor("Label.background")); // NOI18N
+ pane.setBorder(BorderFactory.createEmptyBorder());
+ pane.setEditable(false);
+ pane.setFocusable(true);
+ pane.addHyperlinkListener((e) -> {
+ if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
+ try {
+ Desktop.getDesktop().browse(e.getURL().toURI());
+ } catch (IOException | URISyntaxException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ });
+ JScrollPane sp = new JScrollPane(pane);
+ sp.setBorder(BorderFactory.createEmptyBorder());
+ sp.setPreferredSize(new Dimension(300, 120));
+ descriptor.setMessage(sp);
}
}
diff --git a/platform/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java b/platform/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java
index ae79b98..312cc10 100644
--- a/platform/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java
+++ b/platform/o.n.swing.tabcontrol/beanstubs/org/openide/util/Utilities.java
@@ -56,8 +56,12 @@
/** Operating system is Windows NT. */
public static final int OS_WINNT = 1 << 0;
+ /** Operating system is Windows 95. */
+ public static final int OS_WIN95 = OS_WINNT << 1;
+ /** Operating system is Windows 98. */
+ public static final int OS_WIN98 = OS_WIN95 << 1;
/** Operating system is Solaris. */
- public static final int OS_SOLARIS = OS_WINNT << 1;
+ public static final int OS_SOLARIS = OS_WIN98 << 1;
/** Operating system is Linux. */
public static final int OS_LINUX = OS_SOLARIS << 1;
/** Operating system is HP-UX. */
@@ -93,7 +97,7 @@
public static final int OS_FREEBSD = OS_OTHER << 1;
/** A mask for Windows platforms. */
- public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN2000 | OS_WIN_OTHER;
+ public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN95 | OS_WIN98 | OS_WIN2000 | OS_WIN_OTHER;
/** A mask for Unix platforms. */
public static final int OS_UNIX_MASK = OS_SOLARIS | OS_LINUX | OS_HP | OS_AIX | OS_IRIX | OS_SUNOS | OS_TRU64 | OS_MAC | OS_FREEBSD;
@@ -111,6 +115,10 @@
String osName = System.getProperty ("os.name");
if ("Windows NT".equals (osName)) // NOI18N
operatingSystem = OS_WINNT;
+ else if ("Windows 95".equals (osName)) // NOI18N
+ operatingSystem = OS_WIN95;
+ else if ("Windows 98".equals (osName)) // NOI18N
+ operatingSystem = OS_WIN98;
else if ("Windows 2000".equals (osName)) // NOI18N
operatingSystem = OS_WIN2000;
else if (osName.startsWith("Windows ")) // NOI18N
diff --git a/platform/openide.compat/nbproject/org-openide-compat.sig b/platform/openide.compat/nbproject/org-openide-compat.sig
index cb4fedf..3c868eb 100644
--- a/platform/openide.compat/nbproject/org-openide-compat.sig
+++ b/platform/openide.compat/nbproject/org-openide-compat.sig
@@ -994,6 +994,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
@@ -1635,6 +1637,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
diff --git a/platform/openide.dialogs/src/org/openide/NotifyDescriptor.java b/platform/openide.dialogs/src/org/openide/NotifyDescriptor.java
index e195cfc..104b683 100644
--- a/platform/openide.dialogs/src/org/openide/NotifyDescriptor.java
+++ b/platform/openide.dialogs/src/org/openide/NotifyDescriptor.java
@@ -43,6 +43,7 @@
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
+import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JToggleButton;
@@ -183,10 +184,10 @@
private static final int MAXIMUM_TEXT_WIDTH = 100;
/** preferred width of text area */
- private static final int SIZE_PREFERRED_WIDTH = 300;
+ private static final int SIZE_PREFERRED_WIDTH = 350;
/** preferred height of text area */
- private static final int SIZE_PREFERRED_HEIGHT = 100;
+ private static final int SIZE_PREFERRED_HEIGHT = 150;
private Object message;
/** The message type. */
@@ -342,7 +343,6 @@
if (newMessage instanceof String) {
// bugfix #25457, use JTextArea for word-wrapping
JTextArea area = new JTextArea((String) newMessage);
- area.setPreferredSize(new Dimension(SIZE_PREFERRED_WIDTH, SIZE_PREFERRED_HEIGHT));
area.setBackground(UIManager.getColor("Label.background")); // NOI18N
area.setBorder(BorderFactory.createEmptyBorder());
area.setLineWrap(true);
@@ -351,7 +351,10 @@
area.setFocusable(true);
area.getAccessibleContext().setAccessibleName(NbBundle.getMessage(NotifyDescriptor.class, "ACN_NotifyDescriptor_MessageJTextArea")); // NOI18N
area.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(NotifyDescriptor.class, "ACD_NotifyDescriptor_MessageJTextArea")); // NOI18N
- newMessage = area;
+ JScrollPane sp = new JScrollPane(area);
+ sp.setBorder(BorderFactory.createEmptyBorder());
+ sp.setPreferredSize(new Dimension(SIZE_PREFERRED_WIDTH, SIZE_PREFERRED_HEIGHT));
+ newMessage = sp;
}
message = newMessage;
diff --git a/platform/openide.util.ui/nbproject/org-openide-util-ui.sig b/platform/openide.util.ui/nbproject/org-openide-util-ui.sig
index 15868a6..19ace4b 100644
--- a/platform/openide.util.ui/nbproject/org-openide-util-ui.sig
+++ b/platform/openide.util.ui/nbproject/org-openide-util-ui.sig
@@ -649,6 +649,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
@@ -1261,6 +1263,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
diff --git a/platform/openide.util.ui/nbproject/org-openide-util.sig b/platform/openide.util.ui/nbproject/org-openide-util.sig
index 2662f77..8ec497f 100644
--- a/platform/openide.util.ui/nbproject/org-openide-util.sig
+++ b/platform/openide.util.ui/nbproject/org-openide-util.sig
@@ -1178,6 +1178,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
diff --git a/platform/openide.util.ui/src/org/openide/util/Utilities.java b/platform/openide.util.ui/src/org/openide/util/Utilities.java
index f329544..2f513f2 100644
--- a/platform/openide.util.ui/src/org/openide/util/Utilities.java
+++ b/platform/openide.util.ui/src/org/openide/util/Utilities.java
@@ -95,6 +95,12 @@
/** Operating system is Windows NT. */
public static final int OS_WINNT = BaseUtilities.OS_WINNT;
+ /** Operating system is Windows 95. */
+ public static final int OS_WIN95 = BaseUtilities.OS_WIN95;
+
+ /** Operating system is Windows 98. */
+ public static final int OS_WIN98 = BaseUtilities.OS_WIN98;
+
/** Operating system is Solaris. */
public static final int OS_SOLARIS = BaseUtilities.OS_SOLARIS;
diff --git a/platform/openide.util/nbproject/org-openide-util.sig b/platform/openide.util/nbproject/org-openide-util.sig
index 1938803..18aa7e6 100644
--- a/platform/openide.util/nbproject/org-openide-util.sig
+++ b/platform/openide.util/nbproject/org-openide-util.sig
@@ -497,6 +497,8 @@
fld public final static int OS_UNIX_OTHER = 524288
fld public final static int OS_VMS = 16384
fld public final static int OS_WIN2000 = 8192
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 303111
anno 0 java.lang.Deprecated()
fld public final static int OS_WINNT = 1
diff --git a/platform/openide.util/src/org/openide/util/BaseUtilities.java b/platform/openide.util/src/org/openide/util/BaseUtilities.java
index ba40790..9f1f5ee 100644
--- a/platform/openide.util/src/org/openide/util/BaseUtilities.java
+++ b/platform/openide.util/src/org/openide/util/BaseUtilities.java
@@ -59,8 +59,14 @@
/** Operating system is Windows NT. */
public static final int OS_WINNT = 1/* << 0*/;
+ /** Operating system is Windows 95. */
+ public static final int OS_WIN95 = OS_WINNT << 1;
+
+ /** Operating system is Windows 98. */
+ public static final int OS_WIN98 = OS_WIN95 << 1;
+
/** Operating system is Solaris. */
- public static final int OS_SOLARIS = OS_WINNT << 1;
+ public static final int OS_SOLARIS = OS_WIN98 << 1;
/** Operating system is Linux. */
public static final int OS_LINUX = OS_SOLARIS << 1;
@@ -130,7 +136,7 @@
* @deprecated Use {@link #isWindows()} instead.
*/
@Deprecated
- public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN2000 | OS_WINVISTA | OS_WIN_OTHER;
+ public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN95 | OS_WIN98 | OS_WIN2000 | OS_WINVISTA | OS_WIN_OTHER;
/** A mask for Unix platforms.
* @deprecated Use {@link #isUnix()} instead.
@@ -209,6 +215,10 @@
if ("Windows NT".equals(osName)) { // NOI18N
operatingSystem = OS_WINNT;
+ } else if ("Windows 95".equals(osName)) { // NOI18N
+ operatingSystem = OS_WIN95;
+ } else if ("Windows 98".equals(osName)) { // NOI18N
+ operatingSystem = OS_WIN98;
} else if ("Windows 2000".equals(osName)) { // NOI18N
operatingSystem = OS_WIN2000;
} else if ("Windows Vista".equals(osName)) { // NOI18N
diff --git a/profiler/lib.profiler/nbproject/org-netbeans-lib-profiler.sig b/profiler/lib.profiler/nbproject/org-netbeans-lib-profiler.sig
index 3110c25..1287706 100644
--- a/profiler/lib.profiler/nbproject/org-netbeans-lib-profiler.sig
+++ b/profiler/lib.profiler/nbproject/org-netbeans-lib-profiler.sig
@@ -1023,6 +1023,8 @@
fld public final static int OS_UNIX_MASK = 3064
fld public final static int OS_VMS = 8192
fld public final static int OS_WIN2000 = 4096
+fld public final static int OS_WIN95 = 2
+fld public final static int OS_WIN98 = 4
fld public final static int OS_WINDOWS_MASK = 20487
fld public final static int OS_WINNT = 1
fld public final static int OS_WIN_OTHER = 16384
diff --git a/profiler/lib.profiler/src/org/netbeans/lib/profiler/global/Platform.java b/profiler/lib.profiler/src/org/netbeans/lib/profiler/global/Platform.java
index 341be93..ae9107b 100644
--- a/profiler/lib.profiler/src/org/netbeans/lib/profiler/global/Platform.java
+++ b/profiler/lib.profiler/src/org/netbeans/lib/profiler/global/Platform.java
@@ -39,6 +39,16 @@
public static final int OS_WINNT = 1;
/**
+ * Operating system is Windows 95.
+ */
+ public static final int OS_WIN95 = 2;
+
+ /**
+ * Operating system is Windows 98.
+ */
+ public static final int OS_WIN98 = 4;
+
+ /**
* Operating system is Solaris.
*/
public static final int OS_SOLARIS = 8;
@@ -106,7 +116,7 @@
/**
* A mask for Windows platforms.
*/
- public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN2000 | OS_WIN_OTHER;
+ public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN95 | OS_WIN98 | OS_WIN2000 | OS_WIN_OTHER;
/**
* A mask for Unix platforms.
@@ -391,6 +401,12 @@
if ("Windows NT".equals(osName)) { // NOI18N
return OS_WINNT;
+ } else if ("Windows 95".equals(osName)) { // NOI18N
+
+ return OS_WIN95;
+ } else if ("Windows 98".equals(osName)) { // NOI18N
+
+ return OS_WIN98;
} else if ("Windows 2000".equals(osName)) { // NOI18N
return OS_WIN2000;