|
What this is
Other links
The source code/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.ui.examples; import org.eclipse.core.runtime.Path; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.ui.wizards.IClasspathContainerPage; public class MyClasspathContainerPage extends WizardPage implements IClasspathContainerPage { private IClasspathEntry fEntry; public MyClasspathContainerPage() { super("MyClasspathContainerPage"); setTitle("My Example Container"); } public void createControl(Composite parent) { Label label= new Label(parent, SWT.NONE); if (fEntry == null) { label.setText("Nothing to configure. Press 'Finish' to add new entry"); } else { label.setText("Nothing to configure."); setPageComplete(false); } setControl(label); } public boolean finish() { if (fEntry == null) { // new entry fEntry= JavaCore.newContainerEntry(new Path("org.eclipse.jdt.EXAMPLE_CONTAINER")); } return true; } public IClasspathEntry getSelection() { return fEntry; } public void setSelection(IClasspathEntry containerEntry) { fEntry= containerEntry; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.