当前位置: 首页>>代码示例>>Java>>正文


Java IResource.isAccessible方法代码示例

本文整理汇总了Java中org.eclipse.core.resources.IResource.isAccessible方法的典型用法代码示例。如果您正苦于以下问题:Java IResource.isAccessible方法的具体用法?Java IResource.isAccessible怎么用?Java IResource.isAccessible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.core.resources.IResource的用法示例。


在下文中一共展示了IResource.isAccessible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */
private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	if (getContainerName().length() == 0) {
		updateStatus(EditorConfigMessages.NewEditorConfigFileWizardPage_folder_required_error);
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus(EditorConfigMessages.NewEditorConfigFileWizardPage_folder_noexists_error);
		return;
	}
	if (!container.isAccessible()) {
		updateStatus(EditorConfigMessages.NewEditorConfigFileWizardPage_project_noaccessible_error);
		return;
	}
	if (((IContainer) container).exists(EDITOTR_CONFIG_PATH)) {
		updateStatus(EditorConfigMessages.NewEditorConfigFileWizardPage_folder_already_editorconfig_error);
		return;
	}
	updateStatus(null);
}
 
开发者ID:angelozerr,项目名称:ec4e,代码行数:24,代码来源:NewEditorConfigFileWizardPage.java

示例2: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot()
			.findMember(new Path(getContainerName().get("ProjectPath")));

	if(!containerSourceText.getText().isEmpty()  && !containerTargetText.getText().isEmpty())
	{
		okButton.setEnabled(true);
	}

	if (getContainerName().get("ProjectPath").length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null
			|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	updateStatus(null);
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:29,代码来源:TargetHandlerDialog.java

示例3: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * This method ensures user select Target project and permissions
 */
private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot()
			.findMember(new Path(getContainerName().get("TargetPath")));
	

	if (getContainerName().get("TargetPath").length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null
			|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	updateStatus(null);
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:24,代码来源:WizardPageHandler.java

示例4: findAllEMFFiles

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
private void findAllEMFFiles(final IContainer container) throws CoreException {
  final IResource[] members = container.members();
  for (final IResource member : members) {
    if (member instanceof IContainer) {
      if (member.isAccessible()) {
        findAllEMFFiles((IContainer) member);
      }
    } else if (member instanceof IFile) {
      final IFile file = (IFile) member;
      if (file.getFileExtension().equals("ecore")) {
        allEcoreFiles.put(file.getName(), file);
      }
    }
  }
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:16,代码来源:LoadCompletionProcessor.java

示例5: findAllXMIFiles

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
private void findAllXMIFiles(final IContainer container) throws CoreException {
  final IResource[] members = container.members();
  for (final IResource member : members) {
    if (member instanceof IContainer) {
      if (member.isAccessible()) {
        findAllXMIFiles((IContainer) member);
      }
    } else if (member instanceof IFile) {
      final IFile file = (IFile) member;
      allFiles.put(file.getName(), file);
    }
  }
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:14,代码来源:LoadCompletionProcessor.java

示例6: handleProjectResourceOpenStateChange

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * A project has been opened or closed.  Updates the breakpoints for
 * that project
 * @param project the {@link IProject} that was changed
 */
private void handleProjectResourceOpenStateChange(final IResource project) {
	if (!project.isAccessible()) {
		//closed
		for (IBreakpoint breakpoint : breakpoints) {
			IResource markerResource= breakpoint.getMarker().getResource();
			if (project.getFullPath().isPrefixOf(markerResource.getFullPath())) {
				// TODO remove breakpoints ?!?
			}
		}
		return;
	}
	loadBreakpoints(project);
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:19,代码来源:JimpleBreakpointManager.java

示例7: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot()
			.findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null
			|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("mpe") == false) {
			updateStatus("File extension must be \"mpe\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:41,代码来源:SampleNewWizardPage.java

示例8: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged ()
{
    final IResource container = ResourcesPlugin.getWorkspace ().getRoot ().findMember ( new Path ( getContainerName () ) );
    final String fileName = getFileName ();

    if ( getContainerName ().length () == 0 )
    {
        updateStatus ( "File container must be specified" );
        return;
    }
    if ( container == null || ( container.getType () & ( IResource.PROJECT | IResource.FOLDER ) ) == 0 )
    {
        updateStatus ( "File container must exist" );
        return;
    }
    if ( !container.isAccessible () )
    {
        updateStatus ( "Project must be writable" );
        return;
    }
    if ( fileName.length () == 0 )
    {
        updateStatus ( "File name must be specified" );
        return;
    }
    if ( fileName.replace ( '\\', '/' ).indexOf ( '/', 1 ) > 0 )
    {
        updateStatus ( "File name must be valid" );
        return;
    }
    final int dotLoc = fileName.lastIndexOf ( '.' );
    if ( dotLoc != -1 )
    {
        final String ext = fileName.substring ( dotLoc + 1 );
        if ( ext.equalsIgnoreCase ( "oscar" ) == false )
        {
            updateStatus ( "File extension must be \"oscar\"" );
            return;
        }
    }
    updateStatus ( null );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:47,代码来源:NewArchiveWizardPage.java

示例9: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("cimpl") == false) {
			updateStatus("File extension must be \"cimpl\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:CompImplMainPage.java

示例10: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("deploy") == false) {
			updateStatus("File extension must be \"deploy\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:IntDeploymentMainPage.java

示例11: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("types") == false) {
			updateStatus("File extension must be \"types\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:50,代码来源:TypesMainPage.java

示例12: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("lsys") == false) {
			updateStatus("File extension must be \"lsys\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:IntLogicalSysMainPage.java

示例13: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("srvc") == false) {
			updateStatus("File extension must be \"srvc\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:ServicesMainPage.java

示例14: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("fassmbl") == false) {
			updateStatus("File extension must be \"fassmbl\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:FinalAssemblyMainPage.java

示例15: dialogChanged

import org.eclipse.core.resources.IResource; //导入方法依赖的package包/类
/**
 * Ensures that both text fields are set.
 */

private void dialogChanged() {
	IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getContainerName()));
	String fileName = getFileName();

	if (getContainerName().length() == 0) {
		updateStatus("File container must be specified");
		return;
	}
	if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
		updateStatus("File container must exist");
		return;
	}
	if (!container.isAccessible()) {
		updateStatus("Project must be writable");
		return;
	}
	if (fileName.length() == 0) {
		updateStatus("File name must be specified");
		return;
	}
	if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
		updateStatus("File name must be valid");
		return;
	}
	File file = new File(container.getLocation().toOSString());
	File[] contains = file.listFiles(new FileFilter() {

		@Override
		public boolean accept(File pathname) {
			if (pathname.getName().equalsIgnoreCase(fileName))
				return true;
			else
				return false;
		}
	});
	if (contains != null && contains.length > 0) {
		updateStatus("File name must be different");
		return;
	}
	int dotLoc = fileName.lastIndexOf('.');
	if (dotLoc != -1) {
		String ext = fileName.substring(dotLoc + 1);
		if (ext.equalsIgnoreCase("cdef") == false) {
			updateStatus("File extension must be \"cdef\"");
			return;
		}
	}
	updateStatus(null);
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:54,代码来源:CompDefMainPage.java


注:本文中的org.eclipse.core.resources.IResource.isAccessible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。