upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / ui / newui / PrefPage_Abstract.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2008 Intel Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     Intel Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.cdt.ui.newui;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
15
16 import org.eclipse.cdt.core.model.CoreModel;
17
18 /* This class is a base for preference pages 
19  * which store data in preferences 
20  * It means: 
21  *  - changes are saved by tabs, not by page
22  *  - if changes are made, all projects are
23  *    to be updated
24  */
25 public class PrefPage_Abstract extends AbstractPrefPage {
26         
27         static public boolean isChanged;
28         
29         public PrefPage_Abstract() {
30                 super();
31                 isChanged = false;
32         }
33         
34         protected void doSave(IProgressMonitor monitor) throws CoreException {
35                 if (isChanged) {
36                         CoreModel.getDefault().updateProjectDescriptions(null, monitor);
37                 }
38         }
39
40         @Override
41         protected String getHeader() { return null;     }
42         @Override
43         protected boolean isSingle() { return true; }
44 }