1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 07:35:24 +02:00

[187571] Classification is empty for local directories

This commit is contained in:
Martin Oberhuber 2008-04-10 14:21:44 +00:00
parent ad6d96c018
commit bf869e9058

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others.
* Copyright (c) 2006, 2008 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
@ -7,12 +7,12 @@
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
*
* Contributors:
* {Name} (company) - description of contribution.
* Martin Oberhuber (Wind River) - [187571] Classification is empty for local directories
*******************************************************************************/
package org.eclipse.rse.internal.subsystems.files.local.model;
@ -36,12 +36,12 @@ public class LocalFile extends AbstractRemoteFile implements IRemoteFile
super(subSystem, context, parent, hostFile);
_localHostFile = hostFile;
}
public Object getFile()
{
return _localHostFile.getFile();
}
public boolean isVirtual()
{
return false;
@ -58,14 +58,18 @@ public class LocalFile extends AbstractRemoteFile implements IRemoteFile
return ""; //$NON-NLS-1$
}
}
public String getClassification() {
if (_classification == null && isFile())
{
_classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
if (_classification == null) {
if (isFile()) {
_classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
} else if (isDirectory()) {
_classification = "directory"; //$NON-NLS-1$
} else {
_classification = "unknown"; //$NON-NLS-1$
}
}
return _classification;
}