diff --git a/bundles/com.espressif.idf.ui/plugin.xml b/bundles/com.espressif.idf.ui/plugin.xml index 5726ddef8..8f248ed24 100644 --- a/bundles/com.espressif.idf.ui/plugin.xml +++ b/bundles/com.espressif.idf.ui/plugin.xml @@ -713,6 +713,26 @@ id="com.espressif.idf.ui.manageespidf" name="%editor.espidf.manager.name"> + + + + + + + + @@ -818,6 +838,18 @@ file-extensions="md" file-names="README.md"> + + + + diff --git a/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/nvs/dialog/NvsEditor.java b/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/nvs/dialog/NvsEditor.java new file mode 100644 index 000000000..765c20a76 --- /dev/null +++ b/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/nvs/dialog/NvsEditor.java @@ -0,0 +1,55 @@ +package com.espressif.idf.ui.nvs.dialog; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.MultiPageEditorPart; + +import com.espressif.idf.core.logging.Logger; +import com.espressif.idf.ui.nvs.handlers.NvsEditorHandler; + +public class NvsEditor extends MultiPageEditorPart +{ + public NvsEditor() + { + PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { + try + { + new NvsEditorHandler().execute(null); + } + catch (ExecutionException e) + { + Logger.log(e); + } + }); + + } + + protected void createPages() + { + Composite emptyPage = new Composite(getContainer(), SWT.NONE); + + int index = addPage(emptyPage); + setPageText(index, "Empty Page"); //$NON-NLS-1$ + getSite().getShell().getDisplay().asyncExec(() -> getSite().getPage().closeEditor(this, false)); + + } + + public void doSave(IProgressMonitor monitor) + { + // Nothing to do + } + + public void doSaveAs() + { + // Nothing to do + } + + public boolean isSaveAsAllowed() + { + return false; + } + +} diff --git a/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/partitiontable/dialog/PartitionTableEditor.java b/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/partitiontable/dialog/PartitionTableEditor.java new file mode 100644 index 000000000..51a17f5f4 --- /dev/null +++ b/bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/partitiontable/dialog/PartitionTableEditor.java @@ -0,0 +1,56 @@ +package com.espressif.idf.ui.partitiontable.dialog; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.MultiPageEditorPart; + +import com.espressif.idf.core.logging.Logger; +import com.espressif.idf.ui.partitiontable.handlers.PartitionTableEditorHandler; + +public class PartitionTableEditor extends MultiPageEditorPart +{ + + public PartitionTableEditor() + { + PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { + try + { + new PartitionTableEditorHandler().execute(null); + } + catch (ExecutionException e) + { + Logger.log(e); + } + }); + + } + + protected void createPages() + { + Composite emptyPage = new Composite(getContainer(), SWT.NONE); + + int index = addPage(emptyPage); + setPageText(index, "Empty Page"); //$NON-NLS-1$ + getSite().getShell().getDisplay().asyncExec(() -> getSite().getPage().closeEditor(this, false)); + } + + public void doSave(IProgressMonitor monitor) + { + // Nothing to do + + } + + public void doSaveAs() + { + // Nothing to do + } + + public boolean isSaveAsAllowed() + { + return false; + } + +}