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 d0b5d1205177..447d40ce4322 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 @@ public Set findModules(String gav) throws Ill } /** - * 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 d87a45b9a745..685161846ff7 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 @@ public void dispatchURL (DisplayTask task) { } 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 @@ private String getFileUrl(String url) { 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 a2cae95b1950..5a924712ddaa 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 @@ Link toNon-frame version. - + @@ -828,7 +828,7 @@ Link toNon-frame version. > - + 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 56064a2ef2d7..defab19e6725 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 @@ PKGINST=${pkg.svr4.pkginst} - + @@ -828,7 +828,7 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d > - + 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 25eb5bdbfd18..aba74820c2d9 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 @@ Link toNon-frame version. - + @@ -828,7 +828,7 @@ Link toNon-frame version. > - + 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 d8c35dc49c96..f9253586ffed 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 @@ PKGINST=${pkg.svr4.pkginst} - + @@ -828,7 +828,7 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d > - + 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 f88ae040ad97..9224475bbc63 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 @@ public boolean accept(Element e, TypeMirror t) { addAllStaticMemberNames(env); } final TypeElement enclClass = scope.getEnclosingClass(); + List methodsIn = null; + for (Element e : locals) { switch (simplifyElementKind(e.getKind())) { case ENUM_CONSTANT: @@ -3399,8 +3401,11 @@ public boolean accept(Element e, TypeMirror t) { } 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 @@ private boolean hasAccessibleInnerClassConstructor(Element e, Scope scope, Trees } return false; } - - private boolean conflictsWithLocal(Name name, TypeElement enclClass, Iterable locals) { - for (ExecutableElement local : ElementFilter.methodsIn(locals)) { + + private static boolean conflictsWithLocalMethods(Name name, TypeElement enclClass, List 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 7cb214e5ccad..23ac8100339f 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 @@ public class Unused { @TriggerTreeKind(Kind.COMPILATION_UNIT) public static List unused(HintContext ctx) { - return UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled()) - .stream() - .map(ud -> convertUnused(ctx, ud)) - .filter(err -> err != null) - .collect(Collectors.toList()); + List unused = UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled()); + List 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 2836ce03db25..01db477f4559 100644 --- a/java/performance/sparrow/build.xml +++ b/java/performance/sparrow/build.xml @@ -112,7 +112,7 @@ depends="create-userdir,add-userdir"> Warmup 1 - running IDE once to prime disk and memory caches and create userdir - @@ -123,7 +123,7 @@ Warmup 2 - running IDE a second time prime disk and memory caches and create userdir - @@ -305,7 +305,7 @@ Copying ide.log - 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 bccab0ce6bce..8529024e2725 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 {0} has occurred.

\ + If you are running the latest version of NetBeans you can \ + report this, \ + including a copy of your messages.log file as an attachment.

\ + The messages.log file is located in this folder. -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 f1d21cc8ba0d..d91007eff65b 100644 --- a/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh +++ b/nbbuild/installer/mac/newbuild/commonfiles/signNativeBinaries.sh @@ -28,7 +28,7 @@ fi 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 5eb831681af3..edbfa5543ace 100644 --- a/nbi/engine/native/launcher/windows/src/ExtractUtils.c +++ b/nbi/engine/native/launcher/windows/src/ExtractUtils.c @@ -60,6 +60,7 @@ void skipStub(LauncherProperties * props) { 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 e7b7b755f0cb..5a819eed0580 100644 --- a/nbi/engine/native/launcher/windows/src/Main.c +++ b/nbi/engine/native/launcher/windows/src/Main.c @@ -634,22 +634,27 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hi, LPSTR lpCmdLine, int nCmd 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 983ea131218b..c8b423ec7916 100644 --- a/nbi/engine/native/launcher/windows/src/SystemUtils.c +++ b/nbi/engine/native/launcher/windows/src/SystemUtils.c @@ -36,6 +36,11 @@ void getOSVersion(DWORD *id, DWORD *major, DWORD *minor, DWORD *productType) { 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 bdbffc500122..69437f83fbad 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 7f94e09ec9ce..0bd85453f307 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 @@ class OutWriter extends PrintWriter { 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 4a8da95598b8..18db39811fee 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 @@ OpenIDE-Module-Long-Description=\ # {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.

\ + 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.

\ + However, the system should continue working without further problems.

\ 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 f2417e0ddcde..a809f09a91b3 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 @@ public final class NotifyExcPanel extends JPanel implements ActionListener { /** 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 @@ public final class NotifyExcPanel extends JPanel implements ActionListener { /** 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 @@ private NotifyExcPanel () { 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 @@ public void run() { } } 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 ae79b9853e24..312cc1083561 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 @@ private Utilities() {} /** 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 @@ private Utilities() {} 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 @@ public static final int getOperatingSystem () { 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 cb4fedfc33ea..3c868ebcb142 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_MASK = 1709048 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_MASK = 1709048 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 e195cfcaecbb..104b68398b4c 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 @@ public class NotifyDescriptor extends Object { 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 @@ public void setMessage(Object newMessage) { 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 @@ public void setMessage(Object newMessage) { 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 15868a6b4651..19ace4bda7ef 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_MASK = 1709048 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_MASK = 1709048 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 2662f7725dcd..8ec497fcc8bf 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_MASK = 1709048 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 f32954401d1e..2f513f2bfab4 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 @@ public final class Utilities { /** 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 1938803605b4..18aa7e6cf6f0 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_MASK = 1709048 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 ba40790b4204..9f1f5ee9d8fd 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 @@ public abstract class BaseUtilities { /** 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 @@ public abstract class BaseUtilities { * @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 @@ public static int getOperatingSystem() { 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 3110c2584be2..128770693bd6 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_TRU64 = 512 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 341be93a9afd..ae9107bcb311 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 @@ -38,6 +38,16 @@ public class Platform implements CommonConstants { */ 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. */ @@ -106,7 +116,7 @@ public class Platform implements CommonConstants { /** * 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 @@ public static int getOperatingSystem(String osName) { 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;