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.
*/
private IGetEventInfoDialog fGetEventInfoDialog;
/**
- * The confirmation dialog implementation
+ * The confirmation dialog implementation.
*/
private IConfirmDialog fConfirmDialog;
+
+ /**
+ * The add context dialog implementation.
+ */
+ private IAddContextDialog fAddContextDialog;
+
+ /**
+ * The import dialog implementation.
+ */
+ private IImportDialog fImportDialog;
+
+ /**
+ * The import confirmation dialog.
+ */
+ private IImportConfirmationDialog fImportConfirmationDialog;
// ------------------------------------------------------------------------
// Constructors
/**
* @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;
/**
* Sets the confirmation dialog implementation
- * @param confirmDialog
+ * @param confirmDialog - a confirmation dialog implementation
*/
public void setConfirmDialog(IConfirmDialog confirmDialog) {
fConfirmDialog = confirmDialog;
}
+
+ /**
+ * @return the add context dialog implementation
+ */
+ public IAddContextDialog getAddContextDialog() {
+ if (fAddContextDialog == null) {
+ fAddContextDialog = new AddContextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fAddContextDialog;
+ }
+
+ /**
+ * Sets the add context dialog information
+ * @param addContextDialog - a add context dialog implementation
+ */
+ public void setAddContextDialog(IAddContextDialog addContextDialog) {
+ fAddContextDialog = addContextDialog;
+ }
+
+ /**
+ * @return the import dialog implementation
+ */
+ public IImportDialog getImportDialog() {
+ if (fImportDialog == null) {
+ fImportDialog = new ImportDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fImportDialog;
+ }
+
+ /**
+ * Sets the import dialog implementation.
+ * @param importDialog - a import dialog implementation
+ */
+ public void setImportDialog(IImportDialog importDialog) {
+ fImportDialog = importDialog;
+ }
+
+ /**
+ * @return the import confirmation dialog implementation.
+ */
+ public IImportConfirmationDialog getImportConfirmationDialog() {
+ if (fImportConfirmationDialog == null) {
+ fImportConfirmationDialog = new ImportConfirmationDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fImportConfirmationDialog;
+ }
+
+ /**
+ * Sets the import confirmation dialog implementation.
+ * @param confirmDialog - a import confirmation dialog implementation.
+ */
+ public void setImportConfirmationDialog(IImportConfirmationDialog confirmDialog) {
+ fImportConfirmationDialog = confirmDialog;
+ }
}
-