1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix for 75916: Errors and exceptions in log if you try create a C++ project with

same name/different case.
This commit is contained in:
Bogdan Gheorghe 2005-02-10 16:52:12 +00:00
parent fb287fa5a4
commit af477cff1d
4 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2005-02-10 Bogdan Gheorghe
Fix for 75916: Errors and exceptions in log if you try create a C++ project with
same name/different case.
Refactored CUIPlugin.errorDialog to take a boolean logError.
* src/org/eclipse/cdt/ui/CUIPlugin.java
* src/org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.java
* src/org/eclipse/cdt/ui/wizards/NewCProjectWizard.java
2005-02-09 Alain Magloire
PR 84841: Description of the template in the hover was incorrect.
* src/org/eclipse/cdt/internal/ui/text/TemplateEngine.java

View file

@ -294,9 +294,12 @@ public class CUIPlugin extends AbstractUIPlugin {
/**
* Utility method with conventions
* @param logError TODO
*/
public static void errorDialog(Shell shell, String title, String message, IStatus s) {
getDefault().log(s);
public static void errorDialog(Shell shell, String title, String message, IStatus s, boolean logError) {
if (logError)
getDefault().log(s);
// if the 'message' resource string and the IStatus' message are the same,
// don't show both in the dialog
if (s != null && message.equals(s.getMessage())) {
@ -307,9 +310,12 @@ public class CUIPlugin extends AbstractUIPlugin {
/**
* Utility method with conventions
* @param logError TODO
*/
public static void errorDialog(Shell shell, String title, String message, Throwable t) {
getDefault().log(t);
public static void errorDialog(Shell shell, String title, String message, Throwable t, boolean logError) {
if (logError)
getDefault().log(t);
IStatus status;
if (t instanceof CoreException) {
status = ((CoreException) t).getStatus();

View file

@ -163,7 +163,7 @@ public abstract class TabFolderOptionBlock {
} catch (CoreException e) {
CUIPlugin.errorDialog(
composite.getShell(),
CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e); //$NON-NLS-1$ //$NON-NLS-2$
CUIMessages.getString("TabFolderOptionBlock.error"), CUIMessages.getString("TabFolderOptionBlock.error.settingOptions"), e, true); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
}

View file

@ -242,7 +242,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement
String message= CUIPlugin.getResourceString(OP_ERROR + ".message"); //$NON-NLS-1$
Throwable th= e.getTargetException();
CUIPlugin.errorDialog(shell, title, message, th);
CUIPlugin.errorDialog(shell, title, message, th, false);
try {
getProjectHandle().delete(false, false, null);
} catch (CoreException ignore) {