blob: 7d2c0dd4c6b22d09b1d060a8b3b2fdda2758f777 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>
Creating a top-level interface
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
</head>
<body>
<h1>
Creating a top-level interface
</h1>
<p>
You can create interfaces that are not enclosed in other types.
</p>
<ol>
<li>
Open the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<strong>New Java Interface</strong></a> wizard.
</li>
<li>
Edit the&nbsp;<strong>Source Folder</strong> field as needed to indicate in which folder you want the new interface to reside. You can either type a path
or click the&nbsp;<strong>Browse</strong> button to find the folder. If a folder is found for the current selection, that folder appears in
the&nbsp;<strong>Source Folder</strong> field as the container for the new interface.
</li>
<li>
In the&nbsp;<strong>Package</strong> field, type a name or click&nbsp;<strong>Browse</strong> to select the package where you want the
new interface to reside. If you want the new interface to be created in the default package, leave this field empty.
</li>
<li>
Clear the&nbsp;<strong>Enclosing type</strong> checkbox.
</li>
<li>
In the&nbsp;<strong>Name</strong> field, type a name for the new interface.
(Optionally, in a 5.0 project, add type parameters enclosed in <strong>&lt;</strong> and <strong>&gt;</strong>).
</li>
<li>
Select the <strong>public</strong> or <strong>default</strong> access modifier using the&nbsp;<strong>Modifiers</strong> radio buttons.
</li>
<li>
Click the&nbsp;<strong>Add</strong> button to add interfaces for the new interface to extend.
(Optionally, in a 5.0 project, add type arguments enclosed in <strong>&lt;</strong> and <strong>&gt;</strong>).
</li>
<li>
Click&nbsp;<strong>Finish</strong>.
</li>
</ol>
<p>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" >
</p>
<p>
<a href="../concepts/concepts-3.htm">Java projects</a>
</p>
<p>
<img src="../images/ngrelt.png" alt="Related tasks" border="0" >
</p>
<p>
<a href="tasks-21.htm">Creating a new Java interface</a><br>
<a href="tasks-24.htm">Creating a nested interface</a><br>
<a href="tasks-25.htm">Creating a new interface in a compilation unit</a><br>
<a href="tasks-94.htm">Renaming a type</a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" >
</p>
<p>
<a href="../reference/ref-127.htm">New Java Interface wizard</a><br>
<a href="../reference/ref-3.htm">Java Toolbar actions</a><br>
<a href="../reference/ref-view-package-explorer.htm">Package Explorer</a>
</p>
</body>
</html>