Java tutorial
/* * ### * * Copyright (C) 1999 - 2012 Photon Infotech Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ### */ package com.photon.phresco.ui.preferences; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import com.photon.phresco.ui.internal.controls.PhrescoConfigControl; /** * Global configuration preference page * * @author arunachalam.lakshmanan@photoninfotech.net * */ public class GlobalConfigurationPage extends PreferencePage implements IWorkbenchPreferencePage { /** * */ public GlobalConfigurationPage() { // TODO Auto-generated constructor stub } /** * @param title */ public GlobalConfigurationPage(String title) { super(title); // TODO Auto-generated constructor stub } /** * @param title * @param image */ public GlobalConfigurationPage(String title, ImageDescriptor image) { super(title, image); // TODO Auto-generated constructor stub } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ @Override public void init(IWorkbench workbench) { } /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { IPath configPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(".phresco") .append("phresco-env-config.xml"); PhrescoConfigControl configParent = new PhrescoConfigControl(parent, SWT.NONE, configPath, ""); return configParent; } }