当前位置: 首页>>代码示例>>Java>>正文


Java PageChangedEvent.getSelectedPage方法代码示例

本文整理汇总了Java中org.eclipse.jface.dialogs.PageChangedEvent.getSelectedPage方法的典型用法代码示例。如果您正苦于以下问题:Java PageChangedEvent.getSelectedPage方法的具体用法?Java PageChangedEvent.getSelectedPage怎么用?Java PageChangedEvent.getSelectedPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.dialogs.PageChangedEvent的用法示例。


在下文中一共展示了PageChangedEvent.getSelectedPage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
    Object selectedPage = event.getSelectedPage();

    vpmAnalysisWizard.updateConfiguration();

    if (selectedPage instanceof VPMAnalyzerConfigurationPage) {
        VPMAnalyzerConfigurationPage configPage = (VPMAnalyzerConfigurationPage) selectedPage;
        analyzers = configPage.getAnalyzers();

    } else if (selectedPage instanceof ResultHandlingConfigurationPage) {
        ResultHandlingConfigurationPage resultPage = (ResultHandlingConfigurationPage) selectedPage;
        if (analyzers != null) {
            resultPage.setSelectedAnalyzers(analyzers);
        }
    }
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:18,代码来源:VPMAnalysisWizardPageChangeListener.java

示例2: openDialogBox

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow)
{
	this.setInjectModel((InjectModel) this.getValue());
	CreateInjectWizard wizard = new CreateInjectWizard(this);
	final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	if (getInjectModel() != null) {
		final IPageChangedListener pageChangedListener = new IPageChangedListener() {
			@Override
			public void pageChanged(PageChangedEvent event)
			{
				if (event.getSelectedPage() instanceof CreateCTablePage) {
					((CreateCTablePage) dialog.getCurrentPage())
							.setData((InjectModel) getInjectModel());
					dialog.removePageChangedListener(this);
				}
			}
		};
		dialog.addPageChangedListener(pageChangedListener);
	}
	dialog.open();
	return this.getInjectModel();
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:24,代码来源:CTableDialogCellEditor.java

示例3: openDialogBox

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
protected Object openDialogBox(Control cellEditorWindow)
{
	this.setSqlAreaModel((TableSqlAreaModel) this.getValue());
	CreateTableSqlWizard wizard = new CreateTableSqlWizard(this);
	final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	if (getSqlAreaModel() != null) {
		final IPageChangedListener pageChangedListener = new IPageChangedListener() {
			@Override
			public void pageChanged(PageChangedEvent event)
			{
				if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
					((CreateTableSqlPageOne) dialog.getCurrentPage())
							.setData((TableSqlAreaModel) getSqlAreaModel());
					dialog.removePageChangedListener(this);
				}
			}
		};
		dialog.addPageChangedListener(pageChangedListener);
	}
	dialog.open();
	return this.getSqlAreaModel();
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:23,代码来源:SqlAreaDialogCellEditor.java

示例4: openDialogBox

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow)
{

	this.setSqlSet((SqlSet) this.getValue());
	CreateChartSqlWizard wizard = new CreateChartSqlWizard(this);
	final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	if (getSqlSet() != null) {
		final IPageChangedListener pageChangedListener = new IPageChangedListener() {
			@Override
			public void pageChanged(PageChangedEvent event)
			{
				if (event.getSelectedPage() instanceof CreateSelectChartPage) {
					((CreateSelectChartPage) dialog.getCurrentPage()).setData(getSqlSet());
					dialog.removePageChangedListener(this);
				}
			}
		};
		dialog.addPageChangedListener(pageChangedListener);
	}
	dialog.open();
	return this.getSqlSet();

}
 
开发者ID:winture,项目名称:wt-studio,代码行数:25,代码来源:SqlSetDialogCellEditor.java

示例5: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
	Object selectedPage = event.getSelectedPage();
	if (seenPages.contains(selectedPage))
		return;
	
	seenPages.add(selectedPage);
	if (selectedPage instanceof AbstractTextEditor) {
		IEditorPart editorPart = (IEditorPart) selectedPage;
		IProject project = plugin.getProjectForEditor(editorPart.getEditorInput());
		if (plugin.getIgnoreProjectsList().contains(project.getName()))
			return;
		ISourceViewer sourceViewer = (ISourceViewer) editorPart.getAdapter(ITextOperationTarget.class);
		sourceViewer.getDocument().addDocumentListener(new DocumentListener());
	}
}
 
开发者ID:ChangeOrientedProgrammingEnvironment,项目名称:eclipseRecorder,代码行数:17,代码来源:MultiEditorPageChangedListener.java

示例6: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected void pageChanged(PageChangedEvent event) {
	Object page = event.getSelectedPage();
	if (page instanceof IWorkbenchPart) {
		setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:SnapToTimelineHandler.java

示例7: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
protected void pageChanged(PageChangedEvent event) {
	Object selectedPage = event.getSelectedPage();
	if (selectedPage instanceof IWorkbenchPart) {
		setBaseEnabled(isDecorable((IWorkbenchPart) selectedPage));
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:OneOfEachRowDecoratorParameter.java

示例8: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
	Object page = event.getSelectedPage();
	if (page instanceof IWorkbenchPart) {
		updateHandler((IWorkbenchPart) page);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:FlattenHierarchyHandler.java

示例9: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
	Object page = event.getSelectedPage();
	if (page instanceof IWorkbenchPart) {
		Object adapter = ((WorkbenchPart) page).getAdapter(MergeRowHighlightDecorator.class);
		MergeRowHighlightDecorator decorator = (MergeRowHighlightDecorator) adapter;
		updateState(decorator);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:10,代码来源:ShowRowHighlightHandler.java

示例10: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
/**
 * Called whenever the wizard page has changed and forces its container
 * to resize its content.
 * 
 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
 */
public void pageChanged( PageChangedEvent event )
{
	if ( this.wizardPage == event.getSelectedPage( ) )
	{
		// force size update
		IWizardContainer container = getContainer( );
		if ( container instanceof IWizardContainer2 )
		{
			( (IWizardContainer2) container ).updateSize( );
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:BirtWebProjectWizardConfigurationPage.java

示例11: performRequest

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void performRequest(Request request)
{
	if (request.getType().equals(RequestConstants.REQ_OPEN)) {
		SqlSet sqlSet = new SqlSet();
		CreateChartSqlWizard wizard = new CreateChartSqlWizard(sqlSet);
		final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
				wizard);
		if (((ChartBlockModel) this.getModel()).getSqlSet() != null) {
			final IPageChangedListener pageChangedListener = new IPageChangedListener() {
				@Override
				public void pageChanged(PageChangedEvent event)
				{
					if (event.getSelectedPage() instanceof CreateSelectChartPage) {
						((CreateSelectChartPage) dialog.getCurrentPage())
								.setData(((ChartBlockModel) getModel()).getSqlSet());
						dialog.removePageChangedListener(this);
					}
				}
			};
			dialog.addPageChangedListener(pageChangedListener);
		}
		dialog.open();
		if (sqlSet.getChartType() != null && sqlSet.getSqls() != null) {
			((ChartBlockModel) getModel()).setSqlSet(sqlSet);
			((ChartBlockModel) getModel()).setChartType(sqlSet.getChartType().getName());
			((ChartBlockModel) getModel()).setChartTypeDisplayName(sqlSet.getChartType()
					.getDisplayName());
			((ChartBlockModel) getModel()).setBlockName(sqlSet.getName());
			this.getRoot().getViewer().getEditDomain().getCommandStack().execute(new Command() {
			});
		}
	}
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:35,代码来源:ChartBlockModelPart.java

示例12: init

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void init(IWorkbench targetWorkbench, IStructuredSelection currentSelection) {

	// this.selection = currentSelection;

	List<?> selectedResources = IDE.computeSelectedResources(currentSelection);
	List<IProject> workspaceProjects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());

	// Find all selected projects
	Set<IProject> projects = selectedResources.stream()
			.filter(m -> m instanceof IResource)
			.map(m -> ((IResource) m).getProject())
			.filter(p -> p.isOpen()) // only open projects
			.collect(Collectors.toSet());
	// make the behavior predictable by ordering:
	TreeSet<IProject> sortedProjects = Sets
			.<IProject> newTreeSet((a, b) -> a.getName()
					.compareToIgnoreCase(b.getName()));
	sortedProjects.addAll(projects);

	// 0) turn into IN4JSProject and give and process further.
	// a) find out which projects fulfill the npm-"exportable"-contract
	// b) give back a list to the user what to export,
	// c) disable things not fullfilling the contract.
	// d) take choosing from the list and pass to exporter in non-ui package.

	// 0)
	List<IN4JSEclipseProject> rawN4jsProjects = Lists.newArrayList();
	iP2in4jsP = HashBiMap.create();
	for (IProject iProject : workspaceProjects) {
		IN4JSEclipseProject mappedIn4jsProject = map2In4js(iProject);
		if (mappedIn4jsProject != null) {
			rawN4jsProjects.add(mappedIn4jsProject);

			iP2in4jsP.put(iProject, mappedIn4jsProject);
		}
	}

	// filter out Non-N4JS-projects from initial selection.
	sortedProjects.retainAll(iP2in4jsP.keySet());

	// filter out all non-N4JS-projects from the workspace projects.
	ArrayList<IProject> filteredWorkspaceProjects = new ArrayList<>(workspaceProjects);
	filteredWorkspaceProjects.retainAll(iP2in4jsP.keySet());

	setWindowTitle("N4JS to npm Export");
	setNeedsProgressMonitor(true);

	Map<IProject, Boolean> selectedProjects = new HashMap<>();
	// Add all workspace projects to list, default selection value is false
	filteredWorkspaceProjects.forEach(project -> selectedProjects.put(project, false));
	// Override selection value for all initially selected projects
	sortedProjects.forEach(project -> selectedProjects.put(project, true));

	// exportPage = new ExportSelectionPage("Export Page", rawN4jsProjects, labelProvider);
	exportPage = new ExportSelectionPage("Export Page", selectedProjects);
	if (runTools())
		toolRunnerPage = new NpmToolRunnerPage("npm Execution Page");
	comparePage = new PackageJsonComparePage("Compare package.json Page");

	pageListener = new IPageChangedListener() {

		@Override
		public void pageChanged(PageChangedEvent event) {
			if (event.getSelectedPage() == comparePage) {
				udpatePackagJasonComparison();
			}
		}
	};
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:71,代码来源:NpmExportWizard.java

示例13: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public final void pageChanged(PageChangedEvent event) {
    if (event.getSelectedPage() == this) {
        pageActivated();
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:7,代码来源:AbstractEASyEditorPage.java

示例14: pageChanged

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void pageChanged(PageChangedEvent event) {
    currentPage = (WizardBasePage) event.getSelectedPage();
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:5,代码来源:SinglePageAppDropWizard.java

示例15: performRequest

import org.eclipse.jface.dialogs.PageChangedEvent; //导入方法依赖的package包/类
@Override
public void performRequest(Request request)
{
	if (request.getType().equals(RequestConstants.REQ_OPEN)) {
		try {
			TableSqlAreaModel sqlArea = new TableSqlAreaModel();
			CreateTableSqlWizard wizard = new CreateTableSqlWizard(sqlArea);
			final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
					wizard);
			if (((TableModel) this.getModel()).getSqlAreaModel() != null) {

				final IPageChangedListener pageChangedListener = new IPageChangedListener() {
					@Override
					public void pageChanged(PageChangedEvent event)
					{
						if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
							((CreateTableSqlPageOne) dialog.getCurrentPage())
									.setData(((TableModel) getModel()).getSqlAreaModel());
							dialog.removePageChangedListener(this);
						}
					}
				};
				dialog.addPageChangedListener(pageChangedListener);
			}
			dialog.open();
			if (sqlArea.getSqlName() != null && sqlArea.getSqlArea() != null
					&& sqlArea.getCms() != null) {
				((TableModel) getModel()).setSqlAreaModel(sqlArea);
				((TableModel) getModel()).setSql(sqlArea.getSqlArea());
				((TableModel) getModel()).setSqlName(sqlArea.getSqlName());
				((TableModel) getModel()).removeAllColumn();
				((TableModel) getModel()).addAllColumn(sqlArea.getCms());
				((TableModel) getModel()).setBlockName(sqlArea.getSqlName());
				this.getRoot().getViewer().getEditDomain().getCommandStack()
						.execute(new Command() {
						});
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:43,代码来源:TableModelPart.java


注:本文中的org.eclipse.jface.dialogs.PageChangedEvent.getSelectedPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。