View | Details | Raw Unified | Return to bug 189858 | Differences between
and this patch

Collapse All | Expand All

(-)UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewInputProvider.java (-5 / +5 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.ui.view.team;
18
package org.eclipse.rse.internal.ui.view.team;
Lines 19-26 Link Here
19
import org.eclipse.core.runtime.IAdaptable;
20
import org.eclipse.core.runtime.IAdaptable;
20
import org.eclipse.core.runtime.Platform;
21
import org.eclipse.core.runtime.Platform;
21
import org.eclipse.jface.viewers.Viewer;
22
import org.eclipse.jface.viewers.Viewer;
22
import org.eclipse.rse.core.SystemResourceManager;
23
import org.eclipse.rse.core.model.IHost;
23
import org.eclipse.rse.core.model.IHost;
24
import org.eclipse.rse.core.model.ISystemProfile;
25
import org.eclipse.rse.internal.core.model.SystemProfileManager;
24
import org.eclipse.rse.ui.view.ISystemViewInputProvider;
26
import org.eclipse.rse.ui.view.ISystemViewInputProvider;
25
import org.eclipse.swt.widgets.Shell;
27
import org.eclipse.swt.widgets.Shell;
26
28
Lines 31-37 Link Here
31
 */
33
 */
32
public class SystemTeamViewInputProvider implements IAdaptable, ISystemViewInputProvider
34
public class SystemTeamViewInputProvider implements IAdaptable, ISystemViewInputProvider
33
{
35
{
34
	private Object[] roots = new Object[1]; 
35
	private Shell shell;
36
	private Shell shell;
36
	private Viewer viewer;
37
	private Viewer viewer;
37
			
38
			
Lines 49-57 Link Here
49
	 */
50
	 */
50
	public Object[] getRoots()
51
	public Object[] getRoots()
51
	{
52
	{
52
		if (roots[0] == null)
53
		ISystemProfile[] roots = SystemProfileManager.getDefault().getSystemProfiles();
53
          roots[0] = SystemResourceManager.getRemoteSystemsProject();
54
		return roots;
54
        return roots;
55
	}
55
	}
56
	
56
	
57
    /**
57
    /**
(-)UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java (-1 / +3 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
17
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
18
 * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.ui.view.team;
21
package org.eclipse.rse.internal.ui.view.team;
Lines 97-103 Link Here
97
	public Object getParent(Object element) 
98
	public Object getParent(Object element) 
98
	{
99
	{
99
		if (element instanceof ISystemProfile) 
100
		if (element instanceof ISystemProfile) 
100
			return SystemResourceManager.getRemoteSystemsProject();
101
//			return SystemResourceManager.getRemoteSystemsProject();
102
			return null;
101
		ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
103
		ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
102
		if (adapter != null)
104
		if (adapter != null)
103
			return adapter.getParent(element);
105
			return adapter.getParent(element);
(-)UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java (-1 / +2 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.ui.view.team;
19
package org.eclipse.rse.internal.ui.view.team;
Lines 1395-1401 Link Here
1395
				case 0: elementType = token; break;
1396
				case 0: elementType = token; break;
1396
				// profile
1397
				// profile
1397
				case 1: 
1398
				case 1: 
1398
					project = SystemResourceManager.getRemoteSystemsProject();
1399
					project = SystemResourceManager.getRemoteSystemsProject(false);
1399
					break;
1400
					break;
1400
				case 2: 					
1401
				case 2: 					
1401
					profile = sr.getSystemProfile(token);
1402
					profile = sr.getSystemProfile(token);
(-)plugin.properties (-1 / +2 lines)
Lines 16-21 Link Here
16
# Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
16
# Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
17
# Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
17
# Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
18
# Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
18
# Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
19
# David Dykstal (IBM) - [189858] Renamed the Team view the Profiles view
19
################################################################################
20
################################################################################
20
21
21
# NLS_MESSAGEFORMAT_NONE
22
# NLS_MESSAGEFORMAT_NONE
Lines 51-57 Link Here
51
View.RemoteSystems = Remote Systems
52
View.RemoteSystems = Remote Systems
52
View.RemoteSystemsDetails = Remote System Details
53
View.RemoteSystemsDetails = Remote System Details
53
54
54
View.Team = Team
55
View.Team = Profiles
55
56
56
Perspective.Explorer = Remote System Explorer
57
Perspective.Explorer = Remote System Explorer
57
58
(-)UI/org/eclipse/rse/ui/RSEUIPlugin.java (-12 / +6 lines)
Lines 23-28 Link Here
23
 * Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
23
 * Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
24
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
24
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
25
 * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
25
 * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
26
 * David Dykstal (IBM) - [189858] Delay the creation of the remote systems project
26
 ********************************************************************************/
27
 ********************************************************************************/
27
28
28
package org.eclipse.rse.ui;
29
package org.eclipse.rse.ui;
Lines 85-91 Link Here
85
	    		ISystemRegistry registry = getSystemRegistryInternal();
86
	    		ISystemRegistry registry = getSystemRegistryInternal();
86
87
87
	    		
88
	    		
88
	        	SystemResourceManager.getRemoteSystemsProject(); // create core folder tree  
89
//	        	SystemResourceManager.getRemoteSystemsProject(); // create core folder tree  
89
	        	try
90
	        	try
90
	        	{
91
	        	{
91
	        		SystemStartHere.getSystemProfileManager(); // create folders per profile
92
	        		SystemStartHere.getSystemProfileManager(); // create folders per profile
Lines 99-111 Link Here
99
			   
100
			   
100
		
101
		
101
			    // add workspace listener for our project
102
			    // add workspace listener for our project
102
	        	IProject remoteSystemsProject = SystemResourceManager.getRemoteSystemsProject();
103
	        	IProject remoteSystemsProject = SystemResourceManager.getRemoteSystemsProject(false);
103
	        	SystemResourceListener listener = SystemResourceListener.getListener(remoteSystemsProject);
104
	        	SystemResourceListener listener = SystemResourceListener.getListener(remoteSystemsProject);
104
			    SystemResourceManager.startResourceEventListening(listener);
105
			    SystemResourceManager.startResourceEventListening(listener);
105
				
106
				
106
				// new support to allow products to not pre-create a local connection
107
				// new support to allow products to not pre-create a local connection
107
				if (SystemResourceManager.isFirstTime() && SystemPreferencesManager.getShowLocalConnection()) {
108
//				if (SystemResourceManager.isFirstTime() && SystemPreferencesManager.getShowLocalConnection()) {
108
					// create the connection only if the local system type is enabled!
109
				if (SystemPreferencesManager.getShowLocalConnection()) {
110
					// create the connection only if the local system type is enabled
109
					IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
111
					IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
110
					if (systemType != null) {
112
					if (systemType != null) {
111
						RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
113
						RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
Lines 548-561 Link Here
548
    }
550
    }
549
551
550
    /**
552
    /**
551
     * Return the project used to hold all the Remote System Framework files
552
     */
553
    public IProject getRemoteSystemsProject()
554
    {
555
    	return SystemResourceManager.getRemoteSystemsProject();
556
    }
557
    
558
    /**
559
     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
553
     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
560
     */
554
     */
561
    public void stop(BundleContext context) throws Exception {
555
    public void stop(BundleContext context) throws Exception {
(-)src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java (-7 / +22 lines)
Lines 7-12 Link Here
7
 * 
7
 * 
8
 * Contributors:
8
 * Contributors:
9
 * IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project by
11
 *                                using handle-only operations. The project is created only
12
 *                                if required to exist for writing.
10
 *******************************************************************************/
13
 *******************************************************************************/
11
14
12
package org.eclipse.rse.internal.persistence;
15
package org.eclipse.rse.internal.persistence;
Lines 17-22 Link Here
17
import java.util.List;
20
import java.util.List;
18
import java.util.Set;
21
import java.util.Set;
19
22
23
import org.eclipse.core.resources.IContainer;
20
import org.eclipse.core.resources.IFile;
24
import org.eclipse.core.resources.IFile;
21
import org.eclipse.core.resources.IFolder;
25
import org.eclipse.core.resources.IFolder;
22
import org.eclipse.core.resources.IResource;
26
import org.eclipse.core.resources.IResource;
Lines 24-29 Link Here
24
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.IPath;
25
import org.eclipse.core.runtime.Path;
29
import org.eclipse.core.runtime.Path;
26
import org.eclipse.rse.core.RSECorePlugin;
30
import org.eclipse.rse.core.RSECorePlugin;
31
import org.eclipse.rse.core.SystemResourceManager;
27
32
28
class PFWorkspaceLocation implements PFPersistenceLocation {
33
class PFWorkspaceLocation implements PFPersistenceLocation {
29
	IFolder baseFolder = null;
34
	IFolder baseFolder = null;
Lines 37-49 Link Here
37
	}
42
	}
38
	
43
	
39
	public void ensure() {
44
	public void ensure() {
40
		if (!baseFolder.exists()) {
45
		ensure(baseFolder);
41
			try {
42
				baseFolder.create(true, true, null);
43
			} catch (CoreException e) {
44
				logException(e);
45
			}
46
		}
47
	}
46
	}
48
	
47
	
49
	public PFPersistenceLocation getChild(String childName) {
48
	public PFPersistenceLocation getChild(String childName) {
Lines 134-139 Link Here
134
		return result;
133
		return result;
135
	}
134
	}
136
	
135
	
136
	private void ensure(IContainer resource) {
137
		if (!resource.isAccessible()) {
138
			if (resource.getType() == IResource.PROJECT) {
139
				SystemResourceManager.getRemoteSystemsProject();
140
			} else {
141
				IFolder folder = (IFolder) resource;
142
				ensure(folder.getParent());
143
				try {
144
					folder.create(true, true, null);
145
				} catch (CoreException e) {
146
					logException(e);
147
				}
148
			}
149
		}
150
	}
151
	
137
	private void logException(Exception e) {
152
	private void logException(Exception e) {
138
		RSECorePlugin.getDefault().getLogger().logError("unexpected exception", e); //$NON-NLS-1$
153
		RSECorePlugin.getDefault().getLogger().logError("unexpected exception", e); //$NON-NLS-1$
139
	}
154
	}
(-)src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java (-27 / +28 lines)
Lines 7-12 Link Here
7
 * 
7
 * 
8
 * Contributors:
8
 * Contributors:
9
 * IBM Corporation - initial API and implementation
9
 * IBM Corporation - initial API and implementation
10
 * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project by
11
 *                                using handle-only operations.
10
 *******************************************************************************/
12
 *******************************************************************************/
11
13
12
package org.eclipse.rse.internal.persistence;
14
package org.eclipse.rse.internal.persistence;
Lines 33-51 Link Here
33
	public String[] getProfileLocationNames() {
35
	public String[] getProfileLocationNames() {
34
		List names = new Vector(10);
36
		List names = new Vector(10);
35
		IFolder providerFolder = getProviderFolder();
37
		IFolder providerFolder = getProviderFolder();
36
		try {
38
		if (providerFolder.isAccessible()) {
37
			IResource[] profileCandidates = providerFolder.members();
39
			try {
38
			for (int i = 0; i < profileCandidates.length; i++) {
40
				IResource[] profileCandidates = providerFolder.members();
39
				IResource profileCandidate = profileCandidates[i];
41
				for (int i = 0; i < profileCandidates.length; i++) {
40
				if (profileCandidate.getType() == IResource.FOLDER) {
42
					IResource profileCandidate = profileCandidates[i];
41
					String candidateName = profileCandidate.getName();
43
					if (profileCandidate.getType() == IResource.FOLDER) {
42
					if (candidateName.startsWith(PFConstants.AB_PROFILE)) {
44
						String candidateName = profileCandidate.getName();
43
						names.add(candidateName);
45
						if (candidateName.startsWith(PFConstants.AB_PROFILE)) {
46
							names.add(candidateName);
47
						}
44
					}
48
					}
45
				}
49
				}
50
			} catch (CoreException e) {
51
				logException(e);
46
			}
52
			}
47
		} catch (CoreException e) {
48
			logException(e);
49
		}
53
		}
50
		String[] result = new String[names.size()];
54
		String[] result = new String[names.size()];
51
		names.toArray(result);
55
		names.toArray(result);
Lines 73-79 Link Here
73
	
77
	
74
	/**
78
	/**
75
	 * Returns the IFolder in which a profile is stored. 
79
	 * Returns the IFolder in which a profile is stored. 
76
	 * @return The folder that was created or found.
80
	 * This is a handle operation, the resulting folder may not exist.
81
	 * @return The folder that was found.
77
	 */
82
	 */
78
	private IFolder getProfileFolder(String profileLocationName) {
83
	private IFolder getProfileFolder(String profileLocationName) {
79
		IFolder providerFolder = getProviderFolder();
84
		IFolder providerFolder = getProviderFolder();
Lines 83-118 Link Here
83
88
84
	/**
89
	/**
85
	 * Returns the IFolder in which this persistence provider stores its profiles.
90
	 * Returns the IFolder in which this persistence provider stores its profiles.
86
	 * This will create the folder if the folder was not found.
91
	 * This is a handle operation. It will not create the folder if it is not 
87
	 * @return The folder that was created or found.
92
	 * found.
93
	 * @return The folder that contains the profiles for this provider.
88
	 */
94
	 */
89
	private IFolder getProviderFolder() {
95
	private IFolder getProviderFolder() {
90
		IProject project = SystemResourceManager.getRemoteSystemsProject();
96
		IProject project = SystemResourceManager.getRemoteSystemsProject(false);
91
		try {
97
		if (project.isAccessible()) {
92
			project.refreshLocal(IResource.DEPTH_INFINITE, null);
98
			try {
93
		} catch (Exception e) {
99
				project.refreshLocal(IResource.DEPTH_INFINITE, null);
100
			} catch (Exception e) {
101
			}
94
		}
102
		}
95
		IFolder providerFolder = getFolder(project, "dom.properties"); //$NON-NLS-1$
103
		IFolder providerFolder = getFolder(project, "dom.properties"); //$NON-NLS-1$
96
		return providerFolder;
104
		return providerFolder;
97
	}
105
	}
98
	
106
	
99
	/**
107
	/**
100
	 * Returns the specified folder of the parent container. If the folder does
108
	 * Returns the specified folder of the parent container.
101
	 * not exist it creates it.
109
	 * This is a handle operation. The folder may not exist.
102
	 * @param parent the parent container - typically a project or folder
110
	 * @param parent the parent container - typically a project or folder
103
	 * @param name the name of the folder to find or create
111
	 * @param name the name of the folder to find
104
	 * @return the found or created folder
112
	 * @return the found or created folder
105
	 */
113
	 */
106
	private IFolder getFolder(IContainer parent, String name) {
114
	private IFolder getFolder(IContainer parent, String name) {
107
		IPath path = new Path(name);
115
		IPath path = new Path(name);
108
		IFolder folder = parent.getFolder(path);
116
		IFolder folder = parent.getFolder(path);
109
		if (!folder.exists()) {
110
			try {
111
				folder.create(IResource.NONE, true, null);
112
			} catch (CoreException e) {
113
				logException(e);
114
			}
115
		}
116
		return folder;
117
		return folder;
117
	}
118
	}
118
119
(-)src/org/eclipse/rse/core/SystemResourceManager.java (-38 / +32 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Dave McKnight (IBM) - [177155] Move from rse.ui/systems/org.eclipse.rse.core
14
 * Dave McKnight (IBM) - [177155] Move from rse.ui/systems/org.eclipse.rse.core
15
 * Martin Oberhuber (Wind River) - Re-add missing methods for user actions
15
 * Martin Oberhuber (Wind River) - Re-add missing methods for user actions
16
 * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project
17
 *                                removed unneeded first time logic and flags
18
 *                                renamed createRemoteSystemsProjectInternal to ensureRemoteSystemsProject
19
 *                                made ensureRemoteSystemsProject private instead of protected 
16
 ********************************************************************************/
20
 ********************************************************************************/
17
21
18
package org.eclipse.rse.core;
22
package org.eclipse.rse.core;
Lines 59-66 Link Here
59
63
60
	private static IProject remoteSystemsProject = null;
64
	private static IProject remoteSystemsProject = null;
61
	private static IProject remoteSystemsTempFilesProject = null;
65
	private static IProject remoteSystemsTempFilesProject = null;
62
	private static boolean initDone = false;
63
	private static boolean firstTime = false;
64
	private static SystemResourceHelpers helpers = null;
66
	private static SystemResourceHelpers helpers = null;
65
67
66
	private static ISystemResourceListener _listener = null;
68
	private static ISystemResourceListener _listener = null;
Lines 146-166 Link Here
146
	}
148
	}
147
	
149
	
148
    /**
150
    /**
149
     * Get the default remote systems project.
151
	 * Get the default remote systems project.
150
     * @return IProject handle of the project. Use exists() to test existence.
152
	 * If found but closed, this will open the project.
151
     */
153
	 * @return IProject handle of the project. Use exists() to test existence.
152
    public static IProject getRemoteSystemsProject()
154
	 */
153
    {
155
	public static IProject getRemoteSystemsProject() 
154
    	if (remoteSystemsProject == null)
156
	{
155
    	{
157
		return getRemoteSystemsProject(true);
156
	      remoteSystemsProject = ResourcesPlugin.getWorkspace().getRoot().getProject(RESOURCE_PROJECT_NAME);
158
	}
157
	      if (!initDone || !remoteSystemsProject.isAccessible())
158
	        remoteSystemsProject = createRemoteSystemsProjectInternal(remoteSystemsProject);
159
    	}
160
	    return remoteSystemsProject;
161
    }
162
159
163
	/**
160
	/**
161
	 * Get the default remote systems project.
162
	 * If found but closed, this will open the project.
163
	 * @param force if true force the creation of the project if not found.
164
	 * In any case, returns handle to the project.
165
	 * @return IProject handle of the project. Use exists() to test existence.
166
	 */
167
	public static IProject getRemoteSystemsProject(boolean force) {
168
		if (remoteSystemsProject == null) {
169
			remoteSystemsProject = ResourcesPlugin.getWorkspace().getRoot().getProject(RESOURCE_PROJECT_NAME);
170
		}
171
		if ((!remoteSystemsProject.exists() && force) || (remoteSystemsProject.exists() && !remoteSystemsProject.isOpen())) {
172
			ensureRemoteSystemsProject(remoteSystemsProject);
173
		}
174
		return remoteSystemsProject;
175
	}
176
177
    /**
164
	 * Get the default remote systems temp files project.
178
	 * Get the default remote systems temp files project.
165
	 * @return IProject handle of the project. Use exists() to test existence.
179
	 * @return IProject handle of the project. Use exists() to test existence.
166
	 */
180
	 */
Lines 177-183 Link Here
177
     * @param proj the handle for the remote systems project
191
     * @param proj the handle for the remote systems project
178
     * @return the IProject handle of the project (the argument)
192
     * @return the IProject handle of the project (the argument)
179
     */
193
     */
180
    protected static IProject createRemoteSystemsProjectInternal(IProject proj) 
194
    private static IProject ensureRemoteSystemsProject(IProject proj) 
181
    {
195
    {
182
		// Check first for the project to be closed. If yes, try to open it and if this fails,
196
		// Check first for the project to be closed. If yes, try to open it and if this fails,
183
		// try to delete if first before failing here. The case is that the user removed the
197
		// try to delete if first before failing here. The case is that the user removed the
Lines 189-195 Link Here
189
			} catch (Exception e) {
203
			} catch (Exception e) {
190
				try {
204
				try {
191
					proj.delete(false, true, null);
205
					proj.delete(false, true, null);
192
					
193
					RSECorePlugin.getDefault().getLogger().logWarning("Removed stale remote systems project reference. Re-creating remote system project to recover."); //$NON-NLS-1$
206
					RSECorePlugin.getDefault().getLogger().logWarning("Removed stale remote systems project reference. Re-creating remote system project to recover."); //$NON-NLS-1$
194
				} catch (CoreException exc) {
207
				} catch (CoreException exc) {
195
					// If the delete fails, the original opening error will be passed to the error log.
208
					// If the delete fails, the original opening error will be passed to the error log.
Lines 205-235 Link Here
205
				String newNatures[] = { RemoteSystemsProject.ID };
218
				String newNatures[] = { RemoteSystemsProject.ID };
206
				description.setNatureIds(newNatures);
219
				description.setNatureIds(newNatures);
207
				proj.setDescription(description, null);
220
				proj.setDescription(description, null);
208
				firstTime = true;
209
			} catch (Exception e) {
221
			} catch (Exception e) {
210
				RSECorePlugin.getDefault().getLogger().logError("error creating remote systems project", e); //$NON-NLS-1$
222
				RSECorePlugin.getDefault().getLogger().logError("error creating remote systems project", e); //$NON-NLS-1$
211
			}
223
			}
212
		}
224
		}
213
		try {
214
			// create types folder...
215
			// getResourceHelpers().getOrCreateFolder(proj, RESOURCE_TYPE_FILTERS_FOLDER_NAME);
216
		} catch (Exception e) {
217
			RSECorePlugin.getDefault().getLogger().logError("error opening/creating types folder", e); //$NON-NLS-1$
218
		}
219
		initDone = true;
220
		return proj;
225
		return proj;
221
	}
226
	}
222
    /**
227
223
     * Return true if we just created the remote systems project for the first time.
224
     * This call has the side effect of resetting the flag to false so it doesn't return
225
     * true more than once, ever.
226
     */
227
    public static boolean isFirstTime()
228
    {
229
    	boolean firsttime = firstTime;
230
    	firstTime = false;
231
    	return firsttime;
232
    }
233
    // --------------------------------------------
228
    // --------------------------------------------
234
    // GET ALL EXISTING PROFILE NAMES OR FOLDERS...
229
    // GET ALL EXISTING PROFILE NAMES OR FOLDERS...
235
    // --------------------------------------------
230
    // --------------------------------------------
Lines 385-391 Link Here
385
        String folderName = getFolderName(ssFactory);
380
        String folderName = getFolderName(ssFactory);
386
        return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
381
        return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
387
    }
382
    }
388
383
   
389
    /**
384
    /**
390
     * Get compile commands root folder given a system profile name and subsystem factory Id.
385
     * Get compile commands root folder given a system profile name and subsystem factory Id.
391
     * This is a special-needs method provided for the Import action processing,
386
     * This is a special-needs method provided for the Import action processing,
Lines 396-402 Link Here
396
        IFolder parentFolder = getCompileCommandsFolder(profileName);
391
        IFolder parentFolder = getCompileCommandsFolder(profileName);
397
        return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
392
        return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
398
    }
393
    }
399
   
400
394
401
    // -------------------
395
    // -------------------
402
    // FOLDER ACTIONS...
396
    // FOLDER ACTIONS...
(-)src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java (-4 / +8 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * David Dykstal (IBM) - 142806: refactoring persistence framework
14
 * David Dykstal (IBM) - 142806: refactoring persistence framework
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
16
 * David Dykstal (IBM) - [189858] made sure that a reference remains broken if the profile
17
 *                                contained in the reference was not found.
16
 ********************************************************************************/
18
 ********************************************************************************/
17
19
18
package org.eclipse.rse.internal.core.filters;
20
package org.eclipse.rse.internal.core.filters;
Lines 169-178 Link Here
169
			String profileName = getReferencedFilterPoolManagerName();
171
			String profileName = getReferencedFilterPoolManagerName();
170
			ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
172
			ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
171
			ISystemProfile profile = registry.getSystemProfile(profileName);
173
			ISystemProfile profile = registry.getSystemProfile(profileName);
172
			ISubSystem subsystem = (ISubSystem) getProvider();
174
			if (profile != null) {
173
			ISubSystemConfiguration config = subsystem.getSubSystemConfiguration();
175
				ISubSystem subsystem = (ISubSystem) getProvider();
174
			filterPoolManager = config.getFilterPoolManager(profile);
176
				ISubSystemConfiguration config = subsystem.getSubSystemConfiguration();
175
			filterPool = filterPoolManager.getSystemFilterPool(filterPoolName);
177
				filterPoolManager = config.getFilterPoolManager(profile);
178
				filterPool = filterPoolManager.getSystemFilterPool(filterPoolName);
179
			}
176
		}
180
		}
177
		if (filterPool != null) {
181
		if (filterPool != null) {
178
			setReferenceToFilterPool(filterPool);
182
			setReferenceToFilterPool(filterPool);

Return to bug 189858