亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? devicelibrarieseditorpage.java

?? 配置文件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/**
 * Copyright (c) 2003-2006 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package eclipseme.ui.internal.device.editor;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.DialogCellEditor;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;

import eclipseme.core.importer.LibraryImporter;
import eclipseme.core.internal.EclipseMECorePlugin;
import eclipseme.core.model.API;
import eclipseme.core.model.Classpath;
import eclipseme.core.model.ILibrary;
import eclipseme.core.model.device.IDevice;
import eclipseme.core.model.impl.AbstractDevice;
import eclipseme.core.model.impl.Library;
import eclipseme.core.persistence.PersistableUtilities;
import eclipseme.core.persistence.PersistenceException;
import eclipseme.ui.internal.EclipseMEUIPlugin;
import eclipseme.ui.viewers.TableColumnInfo;
import eclipseme.ui.viewers.TableViewerConfiguration;

/**
 * Implements an editor page for editing the libraries available
 * for the device being edited.
 * <p />
 * Copyright (c) 2003-2006 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.6 $
 * <br>
 * $Date: 2007/01/20 22:19:39 $
 * <br>
 * @author Craig Setera
 */
public class DeviceLibrariesEditorPage extends AbstractDeviceEditorPage {
	private static final Object[] NO_ELEMENTS = new Object[0];

	// Column property names
	private static final String PROP_FILE = "file";
	private static final String PROP_PATH = "path";
	private static final String PROP_APIS = "apis";
	private static final String PROP_JAVADOC = "javadoc";
	private static final String PROP_SOURCE = "source";
	
	// All of the properties in order
	private static final String[] PROPERTIES = 
		new String[] { PROP_FILE, PROP_PATH, PROP_APIS, PROP_JAVADOC, PROP_SOURCE };

	// Column information structure
	private static final int DEFAULT_TABLE_WIDTH = 650;
	private static final TableColumnInfo[] COLUMN_INFO = new TableColumnInfo[] {
		new TableColumnInfo("File", 15f, null),
		new TableColumnInfo("Path", 20f, null),
		new TableColumnInfo("APIs", 15f, null),
		new TableColumnInfo("Javadoc", 25f, null),
		new TableColumnInfo("Source", 25f, null),
	};

	// A cell modifier implementation for the device libraries editor
	private class CellModifier implements ICellModifier {
		public boolean canModify(Object element, String property) {
			return true;
		}

		public Object getValue(Object element, String property) {
			Object value = null;
			Library library = (Library) element;
			
			switch (getColumnIndex(property)) {
				case 0:
				case 1:
					value = library.getLibraryFile();
					break;
					
				case 2:
					value = library.getAPIs();
					break;
					
				case 3:
				case 4:
					value = library.toClasspathEntry();
					break;
			}
			
			return value;
		}

		public void modify(Object element, String property, Object value) {
			TableItem item = (TableItem) element;
			Library library = (Library) item.getData();
			
			switch (getColumnIndex(property)) {
				case 0:
				case 1:
					library.setLibraryFile((File) value);
					break;
					
				case 2:
					library.setApis((API[]) value);
					break;
					
				case 3:
					{
						URL url = getJavadocURL((IClasspathEntry) value);
						library.setJavadocURL(url);
					}
					break;
					
				case 4:
					{
						IClasspathEntry entry = (IClasspathEntry) value;
						library.setSourceAttachmentPath(entry.getSourceAttachmentPath());
						library.setSourceAttachmentRootPath(entry.getSourceAttachmentRootPath());
					}
					break;
			}
			
			viewer.refresh(library, true);
		}

		/**
		 * Return the column index for the property.
		 * 
		 * @param property
		 * @return
		 */
		private int getColumnIndex(String property) {
			int index = -1;
			
			for (int i = 0; i < PROPERTIES.length; i++) {
				if (PROPERTIES[i].equals(property)) {
					index = i;
					break;
				}
			}
			
			return index;
		}
	}
	
	// Content provider for a device's classpath entries
	private class DeviceClasspathContentProvider implements IStructuredContentProvider {
		public Object[] getElements(Object inputElement) {
			Object[] elements = NO_ELEMENTS;

			if (inputElement instanceof Classpath) {
				Classpath classpath = (Classpath) inputElement;
				elements = classpath.getEntries();
			}
			
			return elements;
		}

		public void dispose() {}
		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
	}
	
	// Cell editor for editing library APIs 
	private class APIFileSelectionDialogCellEditor extends DialogCellEditor {
		public APIFileSelectionDialogCellEditor(Composite parent) {
			super(parent);
		}

		protected Object openDialogBox(Control cellEditorWindow) {
			LibraryApiEditorDialog dialog = 
				new LibraryApiEditorDialog(cellEditorWindow.getShell());

        	API[] apis = (API[]) doGetValue();
        	dialog.setAPIs(apis);
        	
			return (dialog.open() == Dialog.OK) ? dialog.getAPIs() : apis;
		}

		/**
		 * @see org.eclipse.jface.viewers.DialogCellEditor#updateContents(java.lang.Object)
		 */
		protected void updateContents(Object value) {
			Label defaultLabel = getDefaultLabel();
	        if (defaultLabel == null)
	            return;

	        String text = "";//$NON-NLS-1$
	        if (value != null) {
	        	API[] apis = (API[]) value;
	        	text = getApisLabel(apis);
	        }
	        defaultLabel.setText(text);
		}
	}
		
	// Cell editor for selecting an archive file 
	private class ArchiveFileSelectionDialogCellEditor extends DialogCellEditor {
		private boolean filepath;
		
		public ArchiveFileSelectionDialogCellEditor(Composite parent, boolean filepath) {
			super(parent);
			this.filepath = filepath;
		}

		protected Object openDialogBox(Control cellEditorWindow) {
			File value = (File) doGetValue();
			return promptForArchiveFile(cellEditorWindow.getShell(), value);
		}

		/**
		 * @see org.eclipse.jface.viewers.DialogCellEditor#updateContents(java.lang.Object)
		 */
		protected void updateContents(Object value) {
			Label defaultLabel = getDefaultLabel();
	        if (defaultLabel == null)
	            return;

	        String text = "";//$NON-NLS-1$
	        if (value != null) {
	        	File file = (File) value;
	        	text = filepath ? file.getParent() : file.getName();
	        }
	        defaultLabel.setText(text);
		}
	}
	
	// Label provider for Library instances
	private class LibraryLabelProvider extends LabelProvider implements ITableLabelProvider {
		public Image getColumnImage(Object element, int columnIndex) {
			return null;
		}

		public String getColumnText(Object element, int columnIndex) {
			Library library = (Library) element;
			String text = "";
			
			if (library != null) {
				switch (columnIndex) {
					case 0:
						text = library.getLibraryFile().getName();
						break;
						
					case 1:
						text = library.getLibraryFile().getParent();
						break;
						
					case 2:
						text = getApisLabel(library.getAPIs());
						break;
						
					case 3:
						{
							URL url = library.getJavadocURL();
							if (url != null) {
								text = url.toString();
							}
						}
						break;
						
					case 4:
						{
							IPath path = library.getSourceAttachmentPath();
							if (path != null) {
								text = path.toString();
							}
						}
						break;
				}
			}
			
			return text;
		}
	}

	// A dialog cell editor for selecting the javadoc URL for a library
	private class JavadocAttachDialogCellEditor extends DialogCellEditor {
		public JavadocAttachDialogCellEditor(Composite parent) {
			super(parent);
		}

		protected Object openDialogBox(Control cellEditorWindow) {
			Shell shell = cellEditorWindow.getShell();
			
			IClasspathEntry newEntry = null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲黄色小说网站| 26uuu欧美| 亚洲综合色成人| 欧美综合亚洲图片综合区| 一区二区三区日韩欧美| 欧美视频一区二区在线观看| 一区二区三区视频在线看| 欧美色视频在线| 国精产品一区一区三区mba视频| 精品国产乱码久久久久久图片| 国产夫妻精品视频| 最新久久zyz资源站| 欧美性大战久久| 精品一区二区在线视频| 日本一区免费视频| 欧美视频中文一区二区三区在线观看| 日本成人在线电影网| 国产丝袜在线精品| 在线亚洲人成电影网站色www| 日韩精品亚洲专区| 中文字幕欧美激情| 欧美视频一区在线观看| 国产一本一道久久香蕉| 亚洲一区二区三区四区五区黄 | 成人听书哪个软件好| 亚洲欧美色图小说| 欧美电影免费观看高清完整版在| 国产激情91久久精品导航 | 日韩黄色片在线观看| 精品成人私密视频| 欧美综合一区二区三区| 国产一区久久久| 亚洲一区在线播放| 中文字幕乱码亚洲精品一区| 欧美日韩精品一区二区三区四区 | 国产精品911| 亚洲一区二区高清| 国产亚洲欧美日韩在线一区| 欧美日韩在线直播| 丁香亚洲综合激情啪啪综合| 午夜精品视频一区| 日韩理论片在线| www国产亚洲精品久久麻豆| 在线精品亚洲一区二区不卡| 国产精品一区二区在线播放| 爽好多水快深点欧美视频| 国产精品狼人久久影院观看方式| 91精品国产综合久久福利| 91美女在线看| 成人白浆超碰人人人人| 精品一区二区在线免费观看| 午夜精品aaa| 国产精品灌醉下药二区| 久久综合给合久久狠狠狠97色69| 欧美色视频在线观看| 99久久精品一区二区| 国产精品亚洲一区二区三区在线| 日本亚洲最大的色成网站www| 一区二区三区 在线观看视频| 中文字幕二三区不卡| 日韩精品中文字幕一区二区三区 | 99久久精品国产毛片| 国产一区二区视频在线| 青青草97国产精品免费观看 | **性色生活片久久毛片| 久久久久亚洲蜜桃| 久久久久青草大香线综合精品| 555夜色666亚洲国产免| 欧美精品123区| 欧美日韩一区视频| 欧美挠脚心视频网站| 欧美自拍偷拍午夜视频| 欧亚一区二区三区| 精品视频999| 欧美美女网站色| 91麻豆精品国产综合久久久久久| 欧美午夜精品理论片a级按摩| 欧美色老头old∨ideo| 欧美乱妇15p| 欧美一区二区观看视频| 日韩欧美国产系列| 欧美精品一区二区三区蜜臀| 国产无遮挡一区二区三区毛片日本| 久久久美女毛片| 欧美激情一二三区| 亚洲欧美怡红院| 亚洲综合另类小说| 日韩精品成人一区二区在线| 奇米四色…亚洲| 国产一区二区久久| 99热在这里有精品免费| 欧洲视频一区二区| 宅男在线国产精品| 国产亚洲一区字幕| 国产精品国产三级国产a | 国产精品电影院| 亚洲免费观看高清完整版在线观看熊| 亚洲自拍偷拍网站| 久久精品99国产精品日本| 国产精品一区二区三区四区 | 亚洲h在线观看| 麻豆传媒一区二区三区| 国产成人在线电影| 色婷婷综合久久久| 欧美一级黄色片| 国产精品欧美经典| 亚洲成年人网站在线观看| 麻豆久久久久久| 成人午夜视频免费看| 欧美艳星brazzers| 欧美v国产在线一区二区三区| 国产精品污网站| 亚洲成人黄色影院| 韩国女主播一区二区三区| 色综合天天综合网天天狠天天| 欧美久久久久久久久久| 久久久久久99久久久精品网站| 亚洲免费视频成人| 久草这里只有精品视频| 91在线视频免费91| 精品免费一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 蜜臀99久久精品久久久久久软件| 国产二区国产一区在线观看| 精品视频1区2区| 亚洲国产高清aⅴ视频| 日韩黄色在线观看| 不卡一区二区在线| 欧美α欧美αv大片| 亚洲一二三四在线| 成人久久18免费网站麻豆 | 精品理论电影在线观看 | 97国产一区二区| 日韩你懂的在线观看| 一区二区三区四区在线免费观看| 久久精品99国产精品日本| 色嗨嗨av一区二区三区| 国产亲近乱来精品视频| 美女脱光内衣内裤视频久久影院| 色婷婷综合视频在线观看| 国产区在线观看成人精品| 免费在线一区观看| 欧美精品久久天天躁| 亚洲视频在线观看三级| 成人美女在线视频| 久久日韩精品一区二区五区| 日韩国产在线观看| 欧美性受极品xxxx喷水| 日韩毛片高清在线播放| 成人毛片老司机大片| 国产欧美精品一区| 国产又粗又猛又爽又黄91精品| 欧美理论片在线| 午夜亚洲国产au精品一区二区| 91片在线免费观看| 国产精品国产精品国产专区不片| 国产一区二区三区四区五区美女| 欧美一二三区在线观看| 日韩av一级电影| 欧美精品在线观看播放| 亚洲一卡二卡三卡四卡五卡| 91成人免费在线视频| 亚洲精品自拍动漫在线| 91一区一区三区| 亚洲精品国产一区二区精华液| 95精品视频在线| 亚洲精品乱码久久久久久久久| 成人av电影在线观看| 中文字幕在线免费不卡| 97久久超碰国产精品| 亚洲免费观看视频| 精品视频1区2区| 日韩高清一级片| 欧美成人综合网站| 国产在线精品免费| 久久九九99视频| 国产成人精品免费一区二区| 欧美国产日本韩| 99国产精品一区| 亚洲一区在线视频观看| 69久久99精品久久久久婷婷| 久久爱另类一区二区小说| 精品99999| 99久久综合国产精品| 一区二区三区四区高清精品免费观看| 91久久国产最好的精华液| 天天综合网天天综合色| 日韩精品中午字幕| 成人伦理片在线| 亚洲午夜在线观看视频在线| 日韩精品一区二区三区中文精品| 国产美女娇喘av呻吟久久| 亚洲欧美一区二区三区孕妇| 欧美日韩一二区| 国产激情一区二区三区四区| 中文字幕一区二区三中文字幕| 在线精品视频免费播放| 免费不卡在线视频| 国产精品蜜臀av| 欧美日韩国产成人在线免费|