Merge commit.
--- a/project/com.nokia.carbide.cpp.project.ui/META-INF/MANIFEST.MF Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/META-INF/MANIFEST.MF Fri Nov 13 13:34:34 2009 -0600
@@ -40,6 +40,8 @@
com.nokia.carbide.cpp.internal.project.ui.images,
com.nokia.carbide.cpp.internal.project.ui.images.providers,
com.nokia.carbide.cpp.internal.project.ui.importWizards,
+ com.nokia.carbide.cpp.internal.project.ui.mmpEditor,
+ com.nokia.carbide.cpp.internal.project.ui.mmpEditor.dialogs,
com.nokia.carbide.cpp.internal.project.ui.mmpEditor.testapi;x-friends:="com.nokia.carbide.automation.utils",
com.nokia.carbide.cpp.internal.project.ui.sharedui,
com.nokia.carbide.cpp.internal.project.ui.views,
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/AIFEditorDialog.java Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/AIFEditorDialog.java Fri Nov 13 13:34:34 2009 -0600
@@ -129,4 +129,12 @@
super.create();
updateValidationMessage();
}
+
+ public AIFEditorContext getContext() {
+ return context;
+ }
+
+ public AIFEditorListPage getPage() {
+ return page;
+ }
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorDialog.java Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorDialog.java Fri Nov 13 13:34:34 2009 -0600
@@ -130,4 +130,12 @@
super.create();
updateValidationMessage();
}
+
+ public MultiImageEditorContext getContext() {
+ return context;
+ }
+
+ public MultiImageListPage getPage() {
+ return page;
+ }
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/ResourcePresentationModel.java Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/ResourcePresentationModel.java Fri Nov 13 13:34:34 2009 -0600
@@ -92,6 +92,7 @@
ResourceBlockDialog dialog = new ResourceBlockDialog(getViewer().getControl().getShell(),
editorContext.project, resourceBlock, editorContext.pathHelper,
editorContext.activeBuildConfig, editorContext.getSecureID());
+ setDialog(dialog);
if (dialog.open() == Dialog.OK) {
List<IMMPResource> items = new ArrayList<IMMPResource>();
items.add(resourceBlock);
@@ -143,6 +144,7 @@
editorContext.project, newValue, editorContext.pathHelper,
editorContext.activeBuildConfig,
editorContext.getSecureID());
+ setDialog(dialog);
if (dialog.open() == Dialog.OK) {
Map<Integer, Object> replaceMap = new HashMap<Integer, Object>();
replaceMap.put(index, newValue);
@@ -272,6 +274,7 @@
null, EMMPPathContext.START_RESOURCE, editorContext.pathHelper,
editorContext.activeBuildConfig,
getRSSFiles(), new String[] {"*.rss"}); //$NON-NLS-1$
+ setDialog(dialog);
if (dialog.open() == Dialog.OK) {
List<IPath> items = new ArrayList<IPath>();
items.add(dialog.getResultPath());
@@ -291,6 +294,7 @@
value, EMMPPathContext.START_RESOURCE, editorContext.pathHelper,
editorContext.activeBuildConfig,
getRSSFiles(), new String[] {"*.rss"}); //$NON-NLS-1$
+ setDialog(dialog);
if (dialog.open() == Dialog.OK) {
int index = listProvider.fetchList(editorContext.mmpView).indexOf(value);
Check.checkState(index >= 0);
@@ -356,6 +360,7 @@
editorContext.mmpView.getAifs(),
editorContext.pathHelper, getRSSFiles());
AIFEditorDialog dialog = new AIFEditorDialog(getViewer().getControl().getShell(), context);
+ setDialog(dialog);
if (dialog.open() == Dialog.OK && context.isDirty()) {
context.doSave();
List<IMMPAIFInfo> items = new ArrayList<IMMPAIFInfo>();
@@ -380,6 +385,7 @@
editorContext.mmpView.getAifs(),
editorContext.pathHelper, getRSSFiles());
AIFEditorDialog dialog = new AIFEditorDialog(getViewer().getControl().getShell(), context);
+ setDialog(dialog);
if (dialog.open() == Dialog.OK && context.isDirty()) {
IMMPAIFInfo newInfo = context.getMMPAIFInfo();
int index = editorContext.mmpView.getAifs().indexOf(info);
@@ -451,7 +457,7 @@
MultiImageEditorContext context = createEditorContext(bitmap);
MultiImageEditorDialog dialog = new MultiImageEditorDialog(editorContext.editor.getSite().getShell(), context);
-
+ setDialog(dialog);
if (dialog.open() == IDialogConstants.OK_ID) {
// initialize the contents of the bitmap beforehand (non-undoable)
// since we need to access this entry by its target file path,
@@ -494,6 +500,7 @@
IMMPBitmap bitmap = lookupBitmap((IPath) element);
MultiImageEditorContext context = createEditorContext(bitmap);
MultiImageEditorDialog dialog = new MultiImageEditorDialog((Shell) editorContext.editor.getAdapter(Shell.class), context);
+ setDialog(dialog);
if (dialog.open() == Dialog.OK && context.isDirty()) {
IUndoableOperation operation = context.getEditingOperation();
WrappedUndoableOperation editingOperation = new WrappedUndoableOperation(
@@ -597,6 +604,7 @@
EMMPLanguage.values(),
new ArrayContentProvider(), new LabelProvider(),
Messages.ResourceModel_editLanguagesDialogPrompt);
+ setDialog(dialog);
dialog.setInitialElementSelections(listProvider.fetchList(editorContext.mmpView));
if (dialog.open() == Dialog.OK) {
Object[] selectedLanguages = dialog.getResult();
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/ResourcesSectionPart.java Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/ResourcesSectionPart.java Fri Nov 13 13:34:34 2009 -0600
@@ -20,6 +20,7 @@
import java.util.List;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
@@ -56,6 +57,7 @@
private Button removeButton;
private Button editButton;
private Button addButton;
+ private Dialog resourceDialog;
class TreeLabelProvider extends LabelProvider {
@@ -307,6 +309,7 @@
TreePresentationModel.ITreeNode container = getSelectedContainer();
if (container != null) {
container.doAdd();
+ resourceDialog = container.getDialog();
}
}
@@ -316,6 +319,7 @@
ITreeNode container = getSelectedContainer();
if (container != null) {
container.doEdit(selection.object);
+ resourceDialog = container.getDialog();
}
}
}
@@ -380,4 +384,11 @@
return removeButton;
}
+ public TreePresentationModel getResourcePresentationModel() {
+ return model;
+ }
+
+ public Dialog getResourceDialog() {
+ return resourceDialog;
+ }
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/TreePresentationModel.java Thu Nov 12 14:50:22 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/TreePresentationModel.java Fri Nov 13 13:34:34 2009 -0600
@@ -18,6 +18,7 @@
import java.util.*;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.*;
import com.nokia.carbide.cpp.internal.project.ui.editors.common.ControlHandler;
@@ -50,7 +51,9 @@
void doAdd();
void doEdit(Object element);
void doRemove(Object element);
-
+ Dialog getDialog();
+ void setDialog(Dialog dialog);
+
/**
* Refresh from the model. If there's no caching or mapping of
* model to presentation objects then this can be a no-op.
@@ -60,6 +63,7 @@
static abstract class BaseTreeNode implements ITreeNode {
String displayText;
+ Dialog dialog;
protected BaseTreeNode(String displayText) {
this.displayText = displayText;
}
@@ -99,11 +103,20 @@
return displayText;
}
+ public Dialog getDialog() {
+ return dialog;
+ }
+
+ public void setDialog(Dialog dialog) {
+ this.dialog = dialog;
+ }
+
public void refreshFromModel() {
}
}
public class Root implements ITreeNode {
+ Dialog dialog;
public boolean canAdd() {
return false;
}
@@ -137,6 +150,12 @@
public boolean isChild(Object element) {
return ObjectUtils.findEqualObject(nodes, element) >= 0;
}
+ public Dialog getDialog() {
+ return dialog;
+ }
+ public void setDialog(Dialog dialog) {
+ this.dialog = dialog;
+ }
public void refreshFromModel() {
}
}