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

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

?? devicelibrarieseditorpage.java

?? 配置文件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
			IClasspathEntry entry = (IClasspathEntry) doGetValue();
			if (entry != null) {
				newEntry = BuildPathDialogAccess.configureJavadocLocation(shell, entry);
			}
			
			return newEntry;
		}

		/**
		 * @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) {
	        	IClasspathEntry entry = (IClasspathEntry) value;
	            URL url = getJavadocURL(entry);
	            if (url != null) {
	            	text = url.toString();
	            }
	        }
	        defaultLabel.setText(text);
		}
	}
	
	// A dialog cell editor for selecting the source locations for a library
	private class SourceAttachDialogCellEditor extends DialogCellEditor {
		public SourceAttachDialogCellEditor(Composite parent) {
			super(parent);
		}

		protected Object openDialogBox(Control cellEditorWindow) {
			Shell shell = cellEditorWindow.getShell();
			
			IClasspathEntry newEntry = null;
			IClasspathEntry entry = (IClasspathEntry) doGetValue();
			if (entry != null) {
				newEntry = BuildPathDialogAccess.configureSourceAttachment(shell, entry);
			}
			
			return newEntry;
		}

		/**
		 * @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) {
	        	IClasspathEntry entry = (IClasspathEntry) value;
	        	IPath attachPath = entry.getSourceAttachmentPath();
	            if (attachPath != null) {
	            	text = attachPath.toString();
	            }
	        }
	        defaultLabel.setText(text);
		}
	}
	
	// Widgets
	private TableViewer viewer;

	/**
	 * Construct the editor page.
	 * 
	 * @param parent
	 * @param style
	 */
	public DeviceLibrariesEditorPage(Composite parent, int style) {
		super(parent, style);
	}

	/**
	 * @see eclipseme.ui.internal.device.editor.AbstractDeviceEditorPage#commitDeviceChanges()
	 */
	public void commitDeviceChanges() {
		Object viewerInput = viewer.getInput();
		if (viewerInput instanceof Classpath) {
			editDevice.setClasspath((Classpath) viewerInput);
		}
	}

	/**
	 * @see eclipseme.ui.internal.device.editor.AbstractDeviceEditorPage#getDescription()
	 */
	public String getDescription() {
		return "Specify the libraries that are available for the device";
	}

	/**
	 * @see eclipseme.ui.internal.device.editor.AbstractDeviceEditorPage#getTitle()
	 */
	public String getTitle() {
		return "Libraries";
	}

	/**
	 * @see eclipseme.ui.internal.device.editor.AbstractDeviceEditorPage#setDevice(eclipseme.core.model.device.IDevice)
	 */
	public void setDevice(IDevice device) {
		super.setDevice(device);
		
		if (device instanceof AbstractDevice) {
			Classpath classpath = ((AbstractDevice) device).getClasspath();
			try {
				Classpath clone = (Classpath) PersistableUtilities.clonePersistable(classpath);
				viewer.setInput(clone);
			} catch (PersistenceException e) {
				EclipseMECorePlugin.log(IStatus.WARNING, "Error cloning device classpath", e);
			}
		}
	}

	/**
	 * Return the javadoc url for the specified entry.
	 * 
	 * @param entry
	 * @return
	 */
	protected URL getJavadocURL(IClasspathEntry entry) {
		URL url = null;

		if ((entry != null) && (entry.getExtraAttributes() != null)) {
			IClasspathAttribute[] attributes = entry.getExtraAttributes();
			for (int i = 0; i < attributes.length; i++) {
				IClasspathAttribute attribute = attributes[i];
				if (attribute.getName().equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
					try {
						url = new URL(attribute.getValue());
					} catch (MalformedURLException e) {
						EclipseMECorePlugin.log(IStatus.WARNING, "Error getting new Javadoc URL", e);
					}
				}
			}
		}
		
		return url;
	}

	/**
	 * Create the devices table viewer.
	 * 
	 * @param parent
	 */
	private TableViewer createTableViewer(Composite composite) {
		int styles = 
			SWT.SINGLE | SWT.V_SCROLL |  
			SWT.BORDER | SWT.FULL_SELECTION;
		Table table = new Table(composite, styles);
		table.setHeaderVisible(true);
		table.setLinesVisible(true);
		
		// Wire up the viewer
		TableViewer viewer = new TableViewer(table);
		viewer.setContentProvider(new DeviceClasspathContentProvider());
		viewer.setLabelProvider(new LibraryLabelProvider());
		
		IDialogSettings viewerSettings = 
			EclipseMEUIPlugin.getDialogSettings("deviceLibrariesViewerSettings");
		TableViewerConfiguration viewerConfiguration =
			new TableViewerConfiguration(viewerSettings, DEFAULT_TABLE_WIDTH, COLUMN_INFO, 0);
		viewerConfiguration.configure(viewer);
		
		// Wire up the cell modification handling
		viewer.setCellModifier(new CellModifier());
		viewer.setColumnProperties(PROPERTIES);
		viewer.setCellEditors(new CellEditor[] {
			new ArchiveFileSelectionDialogCellEditor(table, false),
			new ArchiveFileSelectionDialogCellEditor(table, true),
			new APIFileSelectionDialogCellEditor(table),
			new JavadocAttachDialogCellEditor(table),
			new SourceAttachDialogCellEditor(table), 
		});
		
		return viewer;
	}

	/**
	 * @see eclipseme.ui.internal.device.editor.AbstractDeviceEditorPage#addPageControls(org.eclipse.swt.widgets.Composite)
	 */
	protected void addPageControls(Composite parent) {
		parent.setLayoutData(new GridData(GridData.FILL_BOTH));
		parent.setLayout(new GridLayout(2, false));

		GridData gridData = new GridData(GridData.FILL_BOTH);
		gridData.minimumWidth = DEFAULT_TABLE_WIDTH;
		gridData.heightHint = 400;
		viewer = createTableViewer(parent);
		viewer.getTable().setLayoutData(gridData);

		Composite buttonComposite = new Composite(parent, SWT.NONE);
		buttonComposite.setLayout(new GridLayout(1, true));
		buttonComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
		
		Button addButton = new Button(buttonComposite, SWT.PUSH);
		addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		addButton.setText("Add...");
		addButton.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				handleAddButton();
			}
		});
		
		final Button removeButton = new Button(buttonComposite, SWT.PUSH);
		removeButton.setEnabled(false);
		removeButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		removeButton.setText("Remove");
		removeButton.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				handleRemoveButton();
			}
		});
		
		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
			public void selectionChanged(SelectionChangedEvent event) {
				ILibrary selectedLibrary = getSelectedLibrary();
				removeButton.setEnabled(selectedLibrary != null);
			}
		});
	}

	/**
	 * Return the API's for the library.
	 * 
	 * @param library
	 * @return
	 */
	private String getApisLabel(API[] apis) {
		StringBuffer sb = new StringBuffer();
		
		for (int i = 0; i < apis.length; i++) {
			API api = apis[i];
			if (i != 0) {
				sb.append(", ");
			}
			
			sb.append(api);
		}
		
		return sb.toString();
	}
	
	/**
	 * Return the classpath being edited.
	 * 
	 * @return
	 */
	private Classpath getClasspath() {
		return (Classpath) viewer.getInput();
	}
	
	/**
	 * Return the currently selected library or <code>null</code> if
	 * nothing is selected.
	 * 
	 * @return
	 */
	private ILibrary getSelectedLibrary() {
		IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
		return (selection.size() > 0) ? 
			(ILibrary) selection.getFirstElement() :
			null;
	}
	
	/**
	 * Handle the add button being pressed.
	 */
	private void handleAddButton() {
		File archiveFile = promptForArchiveFile(getShell(), null);
		if (archiveFile != null) {
			LibraryImporter importer = new LibraryImporter();
			ILibrary library = importer.createLibraryFor(archiveFile);
			getClasspath().addEntry(library);
			viewer.refresh();
		}
	}

	/**
	 * Handle the remove button being pressed.
	 */
	private void handleRemoveButton() {
		if (MessageDialog.openConfirm(
			getShell(), 
			"Confirm Remove", 
			"Remove the selected library?")) 
		{
			ILibrary selectedLibrary = getSelectedLibrary();
			getClasspath().removeEntry(selectedLibrary);
			viewer.refresh();
		}
	}
	
	/**
	 * Prompt for an archive file.
	 * 
	 * @param shell
	 * @param currentFile
	 * @return
	 */
	private File promptForArchiveFile(Shell shell, File currentFile) {
		FileDialog fileDialog = new FileDialog(shell);
		fileDialog.setFilterNames(new String[] { "*.jar;*.zip" });
		
		if ((currentFile != null) && (currentFile.exists())) {
			fileDialog.setFileName(currentFile.toString());
		}
		
		String filename = fileDialog.open();
		return (filename == null) ? null : new File(filename);
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩五月天| 精品1区2区在线观看| 色屁屁一区二区| 成人涩涩免费视频| 国产高清在线精品| 成人性色生活片免费看爆迷你毛片| 日韩精品一级二级| 麻豆久久一区二区| 久久99久久精品| 国产一区999| 色综合久久中文字幕| 欧美肥妇bbw| 亚洲欧美一区二区三区国产精品| 91在线观看免费视频| 蜜桃免费网站一区二区三区| 自拍偷拍国产亚洲| 日本一区二区三区在线观看| 91精品国产一区二区三区蜜臀| av福利精品导航| 丁香婷婷深情五月亚洲| 国产精品自拍一区| 国产成人精品午夜视频免费| 麻豆国产欧美日韩综合精品二区| 专区另类欧美日韩| 欧美三级日韩三级| 97se亚洲国产综合在线| 成人av在线资源网| 91亚洲精华国产精华精华液| 欧美另类高清zo欧美| 欧美电影一区二区| 秋霞午夜av一区二区三区| 亚洲天堂网中文字| 青青草一区二区三区| 99久久免费精品高清特色大片| 欧美日韩在线播放| 国产精品视频看| 久草精品在线观看| 91精品欧美一区二区三区综合在 | 久久99精品视频| 麻豆成人91精品二区三区| 激情久久五月天| 99久久99久久精品国产片果冻| 91老师片黄在线观看| 欧美日韩电影一区| 国产亚洲一区二区三区四区| 亚洲男人的天堂av| 久久av资源网| 色老综合老女人久久久| 日韩欧美在线不卡| 亚洲精品中文字幕在线观看| 午夜精品123| 成人三级伦理片| 欧美videos大乳护士334| 国产精品嫩草久久久久| 午夜精品福利视频网站| 91污片在线观看| 久久蜜桃av一区精品变态类天堂| 亚洲成人综合网站| 99久久免费视频.com| 国产日韩v精品一区二区| 免费成人小视频| 欧美另类z0zxhd电影| 国产精品久久久久9999吃药| 精品一区二区三区视频在线观看| 欧美影片第一页| 亚洲小说欧美激情另类| k8久久久一区二区三区| 国产精品电影一区二区| 丁香天五香天堂综合| 国产三级三级三级精品8ⅰ区| 久久精品噜噜噜成人av农村| 91精品国产麻豆| 国内外成人在线| 国产视频在线观看一区二区三区| 国产在线国偷精品免费看| 26uuu精品一区二区| 国产美女精品人人做人人爽| 国产精品色噜噜| 色偷偷成人一区二区三区91| 一区二区成人在线视频| 欧美一级日韩免费不卡| 久久电影国产免费久久电影| 精品国产一区二区亚洲人成毛片 | 国产综合色视频| 久久日一线二线三线suv| 国产成人丝袜美腿| 亚洲一线二线三线视频| 日韩午夜电影在线观看| 成人午夜在线播放| 日本不卡一二三| 中文无字幕一区二区三区 | 波多野结衣的一区二区三区| 亚洲一区在线视频| 久久综合中文字幕| 一本高清dvd不卡在线观看| 捆绑调教美女网站视频一区| 亚洲日韩欧美一区二区在线| 91精品国产色综合久久久蜜香臀| 国产精品综合在线视频| 日韩av不卡一区二区| 最新中文字幕一区二区三区| 欧美成人a视频| 欧美疯狂做受xxxx富婆| 97久久精品人人爽人人爽蜜臀 | 国产精品美女一区二区三区| 日韩一区二区三区在线观看| 色视频成人在线观看免| 色婷婷综合久久久中文一区二区| 久久99国产精品免费| 日韩黄色免费电影| 亚洲h动漫在线| 亚洲成人免费看| 婷婷丁香久久五月婷婷| 亚洲成人综合网站| 亚洲国产成人av| 天涯成人国产亚洲精品一区av| 亚洲一级二级三级在线免费观看| 中文字幕综合网| 亚洲综合无码一区二区| 亚洲自拍与偷拍| 日韩成人午夜电影| 国产一区二区三区美女| 国产精品88av| 色婷婷综合五月| 欧美大片免费久久精品三p| 久久夜色精品国产噜噜av| 国产女人18水真多18精品一级做| 中文字幕中文乱码欧美一区二区 | 亚洲午夜日本在线观看| 性做久久久久久久久| 国产尤物一区二区| 欧美在线视频全部完| 精品福利在线导航| 国产精品久久久久精k8| 三级在线观看一区二区| 成人综合在线视频| 日韩精品中文字幕在线一区| 国产色产综合产在线视频| 亚洲成av人片在线| 国产东北露脸精品视频| 成人av在线观| 欧美群妇大交群中文字幕| 国产精品丝袜一区| 日本不卡视频在线观看| 在线看国产一区| 中文字幕欧美国产| 精品一区二区三区免费观看| 在线观看视频91| 亚洲女爱视频在线| 成人动漫一区二区在线| 久久久99免费| 国产主播一区二区| 久久青草欧美一区二区三区| 亚洲电影第三页| 成人av网站在线观看免费| 久久久www免费人成精品| 日韩精品五月天| 国产盗摄一区二区三区| 成人免费黄色大片| 欧美一区欧美二区| 亚洲一二三四区| 国产黑丝在线一区二区三区| 91麻豆123| 综合激情成人伊人| 午夜av区久久| 在线看日韩精品电影| 97精品久久久午夜一区二区三区 | 日韩一二三区视频| 欧美mv日韩mv国产网站| 国产网站一区二区| 555www色欧美视频| 五月婷婷综合激情| 国产一区二区三区香蕉| 99re视频精品| 久久久久久久久久久久久久久99| 亚洲情趣在线观看| 高清不卡一二三区| 亚洲成a人片在线观看中文| 不卡的电影网站| 久久久久久久久久看片| 偷窥国产亚洲免费视频| 精品国产91九色蝌蚪| 成人白浆超碰人人人人| 亚洲美女区一区| www.亚洲人| 亚洲成va人在线观看| 欧美日韩国产综合草草| 成人激情开心网| 亚洲国产人成综合网站| 国产欧美日本一区二区三区| 色屁屁一区二区| 精品午夜一区二区三区在线观看| 久久精品一区二区三区不卡牛牛| 欧美成人三级电影在线| 99精品热视频| 欧美综合欧美视频| 成人免费三级在线| 成人性生交大片免费看视频在线 | 91麻豆精品国产91久久久资源速度 | 高清av一区二区|