Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse Titan
titan.EclipsePlug-ins
Commits
3e02f423
Commit
3e02f423
authored
Apr 25, 2016
by
ekrisza
Browse files
lets not use literals in conditions if there is a better way
parent
3b11b390
Changes
3
Hide whitespace changes
Inline
Side-by-side
org.eclipse.titan.designer/src/org/eclipse/titan/designer/core/TITANInstallationValidator.java
View file @
3e02f423
...
...
@@ -12,6 +12,7 @@ import java.io.File;
import
org.eclipse.core.runtime.Platform
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.MessageDialog
;
import
org.eclipse.jface.window.Window
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.titan.designer.preferences.PreferenceConstants
;
...
...
@@ -37,7 +38,7 @@ public final class TITANInstallationValidator {
protected
void
buttonPressed
(
final
int
buttonId
)
{
super
.
buttonPressed
(
buttonId
);
if
(
buttonId
==
1
)
{
if
(
buttonId
==
Window
.
CANCEL
)
{
PreferencesUtil
.
createPreferenceDialogOn
(
null
,
"org.eclipse.titan.designer.preferences.pages.TITANPreferencePage"
,
null
,
null
).
open
();
}
...
...
org.eclipse.titan.designer/src/org/eclipse/titan/designer/license/LicenseValidator.java
View file @
3e02f423
...
...
@@ -13,6 +13,7 @@ import org.eclipse.core.runtime.Platform;
import
org.eclipse.core.runtime.preferences.IPreferencesService
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.MessageDialog
;
import
org.eclipse.jface.window.Window
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.titan.common.logging.ErrorReporter
;
...
...
@@ -51,7 +52,7 @@ public final class LicenseValidator {
protected
void
buttonPressed
(
final
int
buttonId
)
{
super
.
buttonPressed
(
buttonId
);
if
(
buttonId
==
1
)
{
if
(
buttonId
==
Window
.
CANCEL
)
{
PreferencesUtil
.
createPreferenceDialogOn
(
null
,
"org.eclipse.titan.designer.preferences.pages.TITANPreferencePage"
,
null
,
null
).
open
();
}
...
...
org.eclipse.titanium/src/org/eclipse/titanium/error/ErrorMessage.java
View file @
3e02f423
...
...
@@ -9,6 +9,7 @@ package org.eclipse.titanium.error;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.MessageDialog
;
import
org.eclipse.jface.window.Window
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.ui.dialogs.PreferencesUtil
;
...
...
@@ -48,11 +49,12 @@ public final class ErrorMessage {
public
void
run
()
{
final
MessageDialog
err
=
new
MessageDialog
(
null
,
windowTitle
,
null
,
message
,
dialogType
,
new
String
[]
{
IDialogConstants
.
OK_LABEL
,
buttonTitle
},
0
)
{
@Override
protected
void
buttonPressed
(
final
int
buttonId
)
{
super
.
buttonPressed
(
buttonId
);
if
(
buttonId
==
1
)
{
if
(
buttonId
==
Window
.
CANCEL
)
{
PreferencesUtil
.
createPreferenceDialogOn
(
null
,
pageName
,
null
,
null
).
open
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment