remove unused code.
Change-Id: I6b2467c5682fc633a15741439872eb3dcf2117ab
Signed-off-by: yonghwan82.jeon <yonghwan82.jeon@samsung.com>
relative="org.eclipse.ui.views.ContentOutline">
</view>
<view
- id="org.tizen.webuibuilder.ui.views.NScreenView3"
+ id="org.tizen.webuibuilder.ui.views.NScreenView"
minimized="false"
relationship="stack"
relative="org.eclipse.ui.views.ContentOutline">
<newWizardShortcut
id="org.tizen.web.project.wizard.webapp">
</newWizardShortcut>
- <view
- id="org.tizen.webuibuilder.ui.views.NScreenView"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.ui.views.ContentOutline">
- </view>
</perspectiveExtension>
</extension>
<extension
<view
category="org.tizen.nativeapp.viewCategory"
class="org.tizen.webuibuilder.ui.views.nscreen.NScreenView"
- id="org.tizen.webuibuilder.ui.views.NScreenView3"
- name="NScreen3"
+ id="org.tizen.webuibuilder.ui.views.NScreenView"
+ name="%nscreenViewName"
restorable="true">
</view>
<view
name="%timeline"
restorable="true">
</view>
- <view
- category="org.tizen.nativeapp.viewCategory"
- class="org.tizen.webuibuilder.ui.views.newnscreen.NScreenView"
- icon="res/icons/checkboxitem_16.png"
- id="org.tizen.webuibuilder.ui.views.NScreenView"
- name="%nscreenViewName"
- restorable="true">
- </view>
</extension>
<extension
point="org.eclipse.ui.newWizards">
import org.tizen.webuibuilder.model.css.io.CssReader;
import org.tizen.webuibuilder.model.descriptors.DescriptorManager;
import org.tizen.webuibuilder.model.filedata.AppFileData;
-import org.tizen.webuibuilder.model.nscreen.NScreenModelManger;
+import org.tizen.webuibuilder.model.nscreen.NScreenModelManager;
import org.tizen.webuibuilder.model.nscreen.descriptors.NScreenDescriptor;
import org.tizen.webuibuilder.model.page.IPageDataSetListener;
import org.tizen.webuibuilder.model.page.PageData;
private String rootFullPath;
- private NScreenModelManger nscreenModelManger;
+ private NScreenModelManager nscreenModelManger;
private NScreenDescriptor nscreenDescriptor;
/**
this.projectManager = projectManager;
this.descriptorManager = descriptorManager;
partFactory = new PartFactory(descriptorManager);
- nscreenModelManger = new NScreenModelManger();
+ nscreenModelManger = new NScreenModelManager();
nscreenDescriptor = new NScreenDescriptor(this);
pageDataSet = new PageDataSet();
return null;
}
- public NScreenModelManger getNScreenModelManger() {
+ public NScreenModelManager getNScreenModelManger() {
return this.nscreenModelManger;
}
import org.tizen.webuibuilder.model.nscreen.Device.Orientation;
-public class DeviceManger {
- Logger logger = LoggerFactory.getLogger(DeviceManger.class);
+public class DeviceManager {
+ Logger logger = LoggerFactory.getLogger(DeviceManager.class);
- static DeviceManger manager = null;
+ static DeviceManager manager = null;
private List<Device> devices = new LinkedList<Device>();
- private DeviceManger() {
+ private DeviceManager() {
}
- public static DeviceManger getDeviceManager() {
+ public static DeviceManager getDeviceManager() {
if (manager == null) {
- manager = new DeviceManger();
+ manager = new DeviceManager();
manager.load();
}
return manager;
import org.tizen.webuibuilder.model.nscreen.NScreenModel.NScreenType;
-public class NScreenModelManger {
+public class NScreenModelManager {
private List<NScreenModel> nscreenModels = new ArrayList<NScreenModel>();
- public NScreenModelManger() {
+ public NScreenModelManager() {
}
public NScreenModel createCommonNscreen() {
import org.tizen.webuibuilder.model.app.AppManager;
import org.tizen.webuibuilder.model.nscreen.Device;
import org.tizen.webuibuilder.model.nscreen.Device.Orientation;
-import org.tizen.webuibuilder.model.nscreen.DeviceManger;
+import org.tizen.webuibuilder.model.nscreen.DeviceManager;
import org.tizen.webuibuilder.nl.BuilderMessages;
import org.tizen.webuibuilder.ui.views.nscreen.NScreenItem;
import org.tizen.webuibuilder.utility.Platform;
// }
if (!resolution.getDeviceMode().equals(appManager.getFrameworkScale())) {
- setResolution(DeviceManger.getDeviceManager().getDevices(), null);
+ setResolution(DeviceManager.getDeviceManager().getDevices(), null);
resetMenuPart();
}
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.ui.views.newnscreen;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.MessagePage;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.PageBookView;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.tizen.webuibuilder.ui.editor.PageDesignerForHTML;
-import org.tizen.webuibuilder.ui.views.nscreen.NScreenViewMessages;
-
-
-/**
- * This sample class demonstrates how to plug-in a new workbench view. The view shows data obtained
- * from the model. The sample creates a dummy model on the fly, but a real implementation would
- * connect to the model available either in this or another plug-in (e.g. the workspace). The view
- * is connected to the model using a content provider.
- * <p>
- * The view uses a label provider to define how model objects should be presented in the view. Each
- * view can present the same model objects using different labels and icons, if needed.
- * Alternatively, a single label provider can be shared between views in order to ensure that
- * objects of the same type are presented in the same way everywhere.
- * <p>
- */
-
-public class NScreenView extends PageBookView {
- private static Logger logger = LoggerFactory.getLogger(NScreenView.class);
-
- /**
- * The constructor.
- */
- public NScreenView() {
- }
-
- @Override
- /*
- * (non-Javadoc) Passing the focus request to the viewer's control.
- *
- * @see org.eclipse.ui.part.PageBookView#setFocus()
- */
- public void setFocus() {
- }
-
- @Override
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
- */
- protected IPage createDefaultPage(PageBook book) {
- MessagePage messagePage = new MessagePage();
- initPage(messagePage);
- messagePage.setMessage(NScreenViewMessages.MESSAGE_DEFAULT);
- messagePage.createControl(book);
- return messagePage;
- }
-
- @Override
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
- */
- protected PageRec doCreatePage(IWorkbenchPart part) {
- PageRec rec = null;
- if (part instanceof PageDesignerForHTML) {
- NScreenViewPage page = new NScreenViewPage();
- initPage(page);
- page.createControl(getPageBook());
- rec = new PageRec(part, page);
- } else {
- logger.info("Call default Page.");
- }
- return rec;
- }
-
- @Override
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart,
- * org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- pageRecord.page.dispose();
- }
-
- @Override
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.PageBookView#getBootstrapPart()
- */
- protected IWorkbenchPart getBootstrapPart() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null) {
- return null;
- }
-
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window == null) {
- return null;
- }
-
- IWorkbenchPage page = window.getActivePage();
- if (page == null) {
- return null;
- }
-
- IEditorPart editor = page.getActiveEditor();
- if (editor == null) {
- return null;
- }
-
- return editor;
- }
-
- @Override
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean isImportant(IWorkbenchPart part) {
- if (!(part instanceof PageDesignerForHTML)) {
- return false;
- }
- return true;
- }
-}
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.ui.views.newnscreen;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.Page;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.tizen.webuibuilder.model.nscreen.Device;
-import org.tizen.webuibuilder.model.nscreen.DeviceManger;
-import org.tizen.webuibuilder.model.nscreen.NScreenModel;
-import org.tizen.webuibuilder.ui.editor.PageDesigner;
-
-
-public class NScreenViewPage extends Page {
- private static Logger logger = LoggerFactory.getLogger(NScreenViewPage.class);
-
- private Composite parentComposite;
- private Button button1;
- private Button button2;
-
- /**
- * Creates a new page.
- */
-
- public NScreenViewPage() {
- // nothing.
- }
-
- @Override
- public void createControl(Composite parent) {
- this.parentComposite = new Composite(parent, SWT.NULL);
- layout();
- }
-
- @Override
- public Control getControl() {
- return this.parentComposite;
- }
-
- /**
- * Sets focus to a part in the page.
- */
-
- @Override
- public void setFocus() {
- this.parentComposite.setFocus();
- }
-
- private void layout() {
- this.parentComposite.setLayout(new FillLayout());
-
- button1 = new Button(this.parentComposite, SWT.PUSH);
- button1.setText("Add/Edit");
- button1.pack();
-
- button2 = new Button(this.parentComposite, SWT.PUSH);
- button2.setText("Custom Device Manger");
- button2.pack();
-
- button1.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- logger.info("Button1 push and Pop Up New Nscreen Input Dialog.");
-
- NscreenInputWizard wizard = new NscreenInputWizard();
- WizardDialog dialog = openWizardDialog(wizard);
- if (dialog == null) {
- logger.info("NscreenInputWizard Dialog is null");
- return;
- }
- dialog.open();
- }
- });
-
- button2.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- logger.info("Button2 push.");
-
- Device device = DeviceManger.getDeviceManager().getDevices().get(0);
- System.out.println(device.print());
-
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
- IEditorPart ieditor = window.getActivePage().getActiveEditor();
-
- PageDesigner editor = (PageDesigner) ieditor;
- List<NScreenModel> list =
- editor.getAppManager().getNScreenModelManger()
- .getNScreenModelsForDevice(device);
- String printData = "";
- for (int i = 0; i < list.size(); i++) {
- NScreenModel model = list.get(i);
- printData += "ModelName :";
- printData += model.getName();
- printData += "\n";
- }
- System.out.println(printData);
-
- }
- });
-
- }
-
- private WizardDialog openWizardDialog(IWizard newWizard) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window == null) {
- logger.info("IWorkbenchWindow is null");
- return null;
- }
- Shell shell = window.getShell();
- if (shell == null) {
- logger.info("Shell is null");
- return null;
- }
-
- WizardDialog dialog = new WizardDialog(shell, newWizard);
- return dialog;
- }
-
-}
import org.tizen.webuibuilder.animator.ui.views.timeline.common.ColorResource;
import org.tizen.webuibuilder.model.css.CssFile;
import org.tizen.webuibuilder.model.nscreen.Device;
-import org.tizen.webuibuilder.model.nscreen.DeviceManger;
+import org.tizen.webuibuilder.model.nscreen.DeviceManager;
import org.tizen.webuibuilder.model.nscreen.NScreenModel;
import org.tizen.webuibuilder.model.nscreen.NScreenModel.NScreenType;
import org.tizen.webuibuilder.ui.views.nscreen.command.NScreenDisableCommand;
}
private List<Device> filterScreen() {
- List<Device> devices = DeviceManger.getDeviceManager().getDevices();
+ List<Device> devices = DeviceManager.getDeviceManager().getDevices();
NScreenType type = model.getType();
-package org.tizen.webuibuilder.ui.views.newnscreen;
+package org.tizen.webuibuilder.ui.views.nscreen.dialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardPage;
*/
-package org.tizen.webuibuilder.ui.views.newnscreen;
+package org.tizen.webuibuilder.ui.views.nscreen.dialog;
import org.eclipse.osgi.util.NLS;
-package org.tizen.webuibuilder.ui.views.newnscreen;
+package org.tizen.webuibuilder.ui.views.nscreen.dialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
+++ /dev/null
-/*
- * UI Builder
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-
-package org.tizen.webuibuilder.ui.views.nscreen.model;
-
-public class NScreenModel {
- private String mTitle;
- private int mWidth;
- private int mHeight;
- private String mFileName;
-
- public NScreenModel(String title, int width, int height, String fileName) {
- mTitle = title;
- mWidth = width;
- mHeight = height;
- mFileName = fileName;
- }
-
- public NScreenModel() {
- this("Basic", 0, 0, "");
- }
-
- public String getTitle() {
- return mTitle;
- }
-
- public void setTitle(String title) {
- mTitle = title;
- }
-
- public int getWidth() {
- return mWidth;
- }
-
- public void setWidth(int width) {
- mWidth = width;
- }
-
- public int getHeight() {
- return mHeight;
- }
-
- public void setHeight(int height) {
- mHeight = height;
- }
-
- public String getFileName() {
- return mFileName;
- }
-
- public void setFileName(String fileName) {
- mFileName = fileName;
- }
-
-}