⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showselection.java

📁 eclipse jsp 插件
💻 JAVA
字号:
package test.actions;

import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.w3c.dom.NamedNodeMap;


@SuppressWarnings("restriction")
public class ShowSelection implements ListenerShowSelection{
	private TableViewer tableViewer;
	private ElementImpl ei;
	public ShowSelection(TableViewer tableViewer,ElementImpl ei){
		this.tableViewer=tableViewer;
		this.ei=ei;
	}
	public ShowSelection(){
		
	}
	public String showSelection(IWorkbenchPart sourcepart, ISelection selection) {
			PropertyFactory pf=new PropertyFactory();
			tableViewer.setInput(pf.showSelection(ei));
			String tagName=pf.getTagName();
			return tagName;
	}

	public void changeSelection(String property,String valueName) {
		NamedNodeMap pro=SampleAction.ei.getAttributes();
		for (int j=0;j<pro.getLength();j++){
			if(property.equals(pro.item(j).getNodeName().trim())){
				SampleAction.ei.getAttributes().item(j).setNodeValue(valueName);
			}
		}
	}

	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -