import org.eclipse.ui.PlatformUI;
-public class TraceControlDialogFactory {
+final public class TraceControlDialogFactory {
// ------------------------------------------------------------------------
// Members
*/
private ICreateChannelDialog fCreateChannelDialog;
- /**
- * The create channel dialog (on session level)
- */
- private ICreateChannelOnSessionDialog fCreateChannelOnSessionDialog;
-
/**
* The create session dialog.
*/
/**
* @return TraceControlDialogFactory instance
*/
- public static TraceControlDialogFactory getInstance() {
- if (null == fInstance) {
+ public synchronized static TraceControlDialogFactory getInstance() {
+ if (fInstance == null) {
fInstance = new TraceControlDialogFactory();
}
return fInstance;
* @return new connection dialog
*/
public INewConnectionDialog getNewConnectionDialog() {
- if (null == fNewConnectionDialog) {
+ if (fNewConnectionDialog == null) {
fNewConnectionDialog = new NewConnectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
}
return fNewConnectionDialog;
* @return create channel dialog (on domain level)
*/
public ICreateChannelDialog getCreateChannelDialog() {
- if (null == fCreateChannelDialog) {
+ if (fCreateChannelDialog == null) {
fCreateChannelDialog = new CreateChannelDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
}
return fCreateChannelDialog;
fCreateChannelDialog = createChannelDialog;
}
- /**
- * @return create channel dialog (on session level)
- */
- public ICreateChannelOnSessionDialog getCreateChannelOnSessionDialog() {
- if (null == fCreateChannelOnSessionDialog) {
- fCreateChannelOnSessionDialog = new CreateChannelDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fCreateChannelOnSessionDialog;
- }
-
- /**
- * Sets a create channel dialog implementation (on domain level).
- * @param createChannelDialog - a create channel dialog implementation
- */
- public void setCreateChannelOnSessionDialog(ICreateChannelOnSessionDialog createChannelDialog) {
- fCreateChannelOnSessionDialog = createChannelDialog;
- }
-
/**
* @return create session dialog implementation
*/
public ICreateSessionDialog getCreateSessionDialog() {
- if (null == fCreateSessionDialog) {
+ if (fCreateSessionDialog == null) {
fCreateSessionDialog = new CreateSessionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
}
return fCreateSessionDialog;
* @return enable events dialog implementation.
*/
public IEnableEventsDialog getEnableEventsDialog() {
- if (null == fEnableEventsDialog) {
+ if (fEnableEventsDialog == null) {
fEnableEventsDialog = new EnableEventsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
}
return fEnableEventsDialog;
* @return get events info dialog implementation.
*/
public IGetEventInfoDialog getGetEventInfoDialog() {
- if (null == fGetEventInfoDialog) {
+ if (fGetEventInfoDialog == null) {
fGetEventInfoDialog = new GetEventInfoDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
}
return fGetEventInfoDialog;
* @return the confirmation dialog implementation
*/
public IConfirmDialog getConfirmDialog() {
- if (null == fConfirmDialog) {
+ if (fConfirmDialog == null) {
fConfirmDialog = new ConfirmDialog();
}
return fConfirmDialog;