Understanding and debugging program code often involves browsing, searching, and stepping through a number of program code files. For example, a user may browse search results or explore definition graphs. Typically, when a file is opened in an Integrated Development Environment (IDE), the IDE adds the file as a tab to the collection of tabs displayed on a display screen. This approach assumes that most of the files that are open will be found useful by the user. However, users can find that so many files have been opened that it becomes difficult to keep track of what files are open and what is of interest in the open files. This can be especially true for a user who is working with unfamiliar code.
When developing and debugging program code in an IDE, the set of files in a user's working set are files that have been fully opened. These files are called durable files. The set of durable files in a user's working set can be represented by a collection of corresponding durable tabs displayed on a user's display screen. One or more durable tabs can be displayed on the screen, one for each file in the user's working set. When a durable tab is selected, the content of the durable file is displayed in a window or pane on a user interface that can be displayed on a display screen.
Files supporting a development activity in an IDE are opened provisionally instead of fully. A file that is opened provisionally is called a previewed file and is transient. Previewed files are not automatically added to the set of files comprising the user's working set. That is, a previewed file is not added to the working set programmatically, triggered by or in response to the file being opened provisionally, without any explicit user action or intervention that causes the file to be added to the working set. Previewed files are not represented in the collection of durable tabs displayed on a user interface. Instead, a previewed file is represented by a single preview tab per well displayed on the user interface. The content of a previewed file can be displayed in a preview display portion of a user interface. The content of a previewed file can be displayed by selecting the single reusable preview tab on the display screen. The previewed file can be displayed automatically in response to specific user actions performed within a workflow. The preview tab can be stylistically distinct (can differ from a stylistic perspective) from a durable tab and can identify the current previewed file.
One or more mechanisms can be provided to enable promotion of a previewed file to a durable file. A promoted previewed file is transformed to become a fully open file and the promoted previewed file is automatically added to the files comprising the working set for the development activity. A previewed file that is promoted to become a member of the user's working set is displayed instead by selecting a new tab in the collection of durable tabs and is displayed in a durable file display.
Selecting a preview tab can display the content of a file that a user has chosen to open provisionally instead of to open fully. When the user chooses to view another previewed file, a new preview tab is not created within the document well. Instead the identifier of the single preview tab is refreshed with the identifier of the new previewed file. Similarly, the content of the preview display can be refreshed with the content of the new previewed file. Selecting the provisional tab can result in display of the content of the new previewed file. Reusing a single preview tab for previewed files can manage a working set, and can reduce the number of tabs that appear on the display screen. A historical record of previewed files can be maintained. A file can be previewed by actions such as stepping through code in the debugger, or by performing particular user gestures in tool windows and/or content handlers.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In the drawings:
a is an illustration of a method for managing a working set in accordance with aspects of the subject matter disclosed herein;
b, 2c, 2d, 2e, 2f and 2g are illustrations of examples of user interfaces in accordance with aspects of the subject matter disclosed herein;
Suppose a user such as a developer is exploring a sample application with the intent of using it as the starting point for a new application he has been asked to develop. Suppose the sample application includes several projects and many code files. The user may spend a few minutes locating a useful application entry point using a “find” search feature and then may browse through the source code and definitions using a “go to definition” feature. Typically, in known IDEs, selecting a search result or using a “find” feature opens the file and includes it in the user's working set. The user either has to spend time closing files and rearranging remaining files in his working set or he has to spend more time searching in a working set that includes a number of files that may not be helpful. In accordance with aspects of the subject matter disclosed herein, selecting a search result or using a “find” feature results in a file being previewed instead of fully opening the file. This approach allows the user to browse a code file and then decide if the file is likely to be useful for his project. The previewed file is not added to the working set until an explicit user action is performed, giving the user more control over his working set.
Now suppose a user such as a developer is trying to fix bugs in an unfamiliar application. After reproducing the bugs, the user may begin to explore the program code, setting breakpoints and stepping through the code. Suppose that although the application is large, the user has deduced that only a handful of code files are likely to be involved in fixing the bugs. In accordance with aspects of the subject matter disclosed herein, any file that the user steps into with the debugger is previewed, allowing the user to browse program code without adding to the collection of files already determined to be relevant to fixing the bugs. When the user spots relevant lines of code in a previewed file, the file including those lines of code can be added to his working set by an explicit user action, reducing the work involved in managing the working set.
In accordance with aspects of the subject matter disclosed herein, a previewed file can be transformed into a durable file by an explicit user action. The transformed file can be integrated seamlessly into the user's current workflow. The action or gesture that triggers the transformation of the document from the previewed state to the durable state can be clearly distinguished from an action or gesture used to open a document fully. Distinct user interface (UI) prompts are provided for the user to trigger the transformation. In accordance with some aspects of the subject matter described herein, previewed file content is stylistically distinguishable from durable file content. That is, content from a previewed file differs in stylistic appearance from content from a fully opened (durable) file. Previewed files can be viewed by selecting a preview tab in a user interface. The preview tab can be separated spatially from the collection of durable tabs in the user interface. The appearance of the preview tab can be stylistically distinguishable from the appearance of a durable tab. The chronological order in which previewed files have been viewed by the user can be maintained and retrieved. The history of previewed files can be kept separate or can be integrated with the history of fully opened files. The feature enabling previewing of files can be integrated with existing workflows. The feature can be turned on or off by a user.
One workflow in which previewing files can be integrated is debugging code. During a debug session, when code is stepped into, the file that is stepped into can be previewed. The file can be viewed in the preview display. The previewed file is not added to the user's working set. Because previewing a stepped-into file does not automatically add the file to the user's working set, the number of files that appear in the user interface as a result of stepping through code can be reduced. Similarly, a file can be previewed when the user performs a command that goes to a definition of a method, function, or variable in the file. For example, in response to receiving a “go to definition” command, the file containing the definition can be previewed in the preview display but is not automatically added to the working set of files. The identifier of the file does not appear in the collection of durable tabs on the display screen. Instead the identifier of the file can appear in a single reusable preview tab that is stylistically distinguishable from the durable tabs in the user interface. The user can promote the previewed file to a fully opened file by performing particular user gestures such as selecting a promote button or by performing particular user actions in programming tools and content handlers such as editing the file.
System 100 may include one or more computers or computing device such as a computer 102 comprising: one or more processors such as processor 142, etc., a memory such as memory 144, and one or more modules for detecting a preview trigger, previewing a file, viewing the previewed file and optionally promoting the previewed file to a durable file in an IDE. In
Preview module 106, etc. may include one or more modules that detect one of a plurality of actions that trigger previewing a file, the actions occurring in a workflow process 128. Previewing a file can be triggered by receiving user input 122 and/or by receiving input received from a tool or other program executing in the workflow process 128, as described more fully below. Alternatively, preview module 106, etc. may receive a notification from workflow process 128, indicating that a request to preview an indicated file has been received. In response, preview module 106, etc., can preview the indicated file (e.g., previewed file 108) and place the content of the previewed file 108 in a preview file display 110 of a user interface 126. Preview module 106, etc. can place a file identifier of the previewed file 108 in a preview tab of the user interface 126 and display the content of the previewed file in the preview file display 110 of the user interface 126. Preview file display 110 can include both an area for content of the previewed file and the preview tab that identifies the file which is the source of the content.
The preview file display 110 can be stylistically distinct from the visual representation of a fully opened document. The preview tab that identifies the previewed file can be separated from the collection of durable tabs in the user interface 126. If the preview tab already houses an identifier of a previously previewed file, the existing identifier can be removed and/or replaced with the current previewed file identifier. Similarly, if the preview file display 110 already houses content associated with a previous previewed file, the content can be removed and/or replaced with the content associated with the current previewed file, thus reusing both the preview tab and the preview file display 110 in the user interface 126. That is, both the preview display and the preview tab are reusable. In contrast, durable tabs are non-reusable. Only one preview tab and only one preview display may be available per well in the user interface. A document well (e.g., document well 231 of
As described above, a previewed file is not automatically added to the working set 112 in response to being previewed, as is the case with fully opened files. The working set 112 is comprised of all the files that were fully opened during the development activity (e.g., file 114, 116, etc.). Files are only removed from the working set by an explicit action taken by a user closing the fully opened file. However, the transient previewed file can be promoted to a durable fully opened file and can be added to the working set 112 in response to the promotion of the previewed file. In accordance with some aspects of the subject matter disclosed herein, when a previewed file is promoted, the content of the preview file display 110 may be replaced with the content of the previous previewed file. Similarly, the identifier of the preview tab may be replaced with the corresponding identifier. The preview module 106, etc. can receive further input from a user indicating that a previewed file is to be promoted to a durable file. For example, a promote button can be presented on the user interface 126 (e.g., on the preview tab, above the preview tab, etc.). In response to a user action clicking on the promote button, or otherwise selecting the promote command, the previewed file 108 can be transformed to a durable file. The preview module 106, etc. can receive further input from a program executing in the workflow process 128 such as but not limited to a programming tool or content tool, indicating that a previewed file is to be promoted to a durable file. In response, the preview module 106, etc. can promote the previewed file 108 to a durable file and add the promoted previewed file to the working set 112. Promotion of the previewed file 108 to a durable file transforms the previewed file 108 to a durable or fully opened file, adds it to the working set 112, removes the previewed file identifier from the preview tab, removes the previewed file content from the preview file display 110, removes the preview tab, and adds the identifier of the promoted previewed file to the collection of durable tabs displayed in the user interface 126.
The preview module 106, etc. may remove the promoted previewed file from the previewed file history 120 and may add the promoted previewed file to the durable file history. If the previewed file history is merged with the durable file history, the preview module 106, etc. can change the appearance of the file identifier to the appearance of a durable file identifier.
By previewing files only one preview tab is used per document well, reducing the total number of tabs displayed in the user interface 126 and reducing the total number of files in a user's working set. Previewed files can include files such as but not limited to code files, text files, design files, work items, and any other file type supported by the IDE 104.
User actions triggering previewing a file can be distinct from user actions triggering fully opening a file. For example,
It will be appreciated that although one example of a tool window is displayed, any tool window, editor, or designer supporting the feature or features described herein are contemplated. For example, a distinct user action such as but not limited to single clicking on the name of a file in a list of files in a navigator or other tool window can also comprise a user action that triggers previewing a file. It will be appreciated that, in the example, single clicking on a file name can contrast to double clicking on the name of the file in the tool, where double clicking on the file name fully opens the file and adds the file to the working set. The preview module 106, etc. can map a command to preview a file to a gesture including but not limited to the single click gesture. The file does not have to be selected in a separate action before the preview gesture is made. Alternatively, options can be provided in the user interface for previewing a selected file. For example, a preview button can be provided on a menu bar or right clicking on a button may generate a list in which an option is previewing a selected file.
Previewing a file may occur as a result of a particular user action or series of actions within a workflow. For example,
In known IDEs, a debugging session can cause additional documents to open automatically, without explicit user direction. That is, in known IDEs, in response to stepping into a file being debugged, the stepped-into file is opened fully, the file identifier of the stepped-into file is placed in a durable tab in the collection of durable tabs in the user interface and the stepped-into file is added to the working set. In contrast, in accordance with aspects of the subject matter disclosed herein, instead of fully opening each file that the user steps into in a debug session, the file stepped into is previewed and the identifier of the previewed file is placed in the single reusable preview tab of the well. The content of the previewed file may be displayed automatically in a previewed file display. The previewed file is not added to the working set. However, the previewed file can be promoted to a durable file. Thus at the end of a debug session the only files added to the working set are files that were either explicitly promoted to durable files or were promoted because of well-defined actions taken by the user in the workflow.
f illustrates an example of a user interface 260 where a user is debugging a file PaintCanvas.cs. PaintCanvas.cs is a fully opened file. The user has placed a breakpoint at the line indicated by the circle 264 in content 262. When the debugger suspends execution of the program at the breakpoint, the user can step into the method setColor (see text box 268. It will be appreciated that text box 268 is appears in
User actions performed in the workflow that automatically promote a previewed file to a durable file include editing a previewed file in a source code editor, designer or class diagram. Editing a previewed file, automatically, without explicit user intervention, promotes the previewed file to a durable file. An action attempting to drag the preview tab, automatically, without explicit user intervention, promotes the previewed file to a durable file. Executing a float command on the content of a previewed document automatically, without explicit user intervention, promotes the previewed file to a durable file. A float command removes the tab and document viewing pane from the document well and places it on top of the IDE in its own window.
Another way that a previewed file can be transformed into a durable file is by selecting a promote option. For example, when a user clicks a promote button or selects a promote command, a new durable tab can be created. The new durable tab can include the same content that the user was previewing and can be scrolled to the same view state. The preview tab can be refreshed to show the identifier of the file that was previewed prior to the one just promoted. If a file in preview mode is edited, the file can automatically be promoted to a durable file, placed in a durable tab and added to the working set. Automatically promoting an edited previewed file in this way means that the user does not have to explicitly promote the file before he begins editing. If a user tries to drag content of a preview display elsewhere on the user interface, the previewed file can be promoted automatically to a durable file. A durable file can be placed elsewhere in the environment using a drag operation.
Finally, a list of previewed files viewed by a user can be provided to the user. The list gives the user an opportunity to go back to a document that was previewed earlier but was not promoted to a durable file. A chronological ordering of previewed documents can be available using a navigation feature that allows a user to navigate backwards and forwards.
a illustrates an example of a method 200 that can be used to view previewed files, and to manage a user's working set in accordance with aspects of the subject matter disclosed herein. The method described in
At 202 previewing a file can be initiated in various ways, as described above. Previewing a file can be triggered by detection of a user action performing a particular action or gesture that is distinguishable from a file open action or gesture. For example, single clicking on a file displayed in a tool window can be a trigger to preview the selected file. Previewing a file can be triggered by editing content (e.g., in an editor, designer, class diagram, etc.). Previewing a file can be triggered by executing a “go to definition” command, wherein the file including the definition is automatically previewed. Previewing a file can be triggered by a debug operation in which a user steps into a debug file and so on. At 204, in response to determining that the file is already fully open, the durable file is displayed in a durable file display at 219. In response to determining that the file is not already fully open, processing continues at 206. Alternatively, in accordance with some aspects of the subject matter disclosed herein, even though a file selected for preview is already in the user's working set, instead of displaying the durable file in a durable file display, the file selected for preview is displayed in a preview display, and can be scrolled to the same view state.
At 206 if it is determined that the previewed file display already contains content, the existing content is removed at 218. At 206 if it is determined that the previewed file display does not already contain content, the previewed file content is loaded into the previewed file display at 208. At 210, the previewed file display is displayed on the user interface. At 212 the previewed file identifier is added to the list of previously previewed documents in the previewed file history. As described above the previewed file history can be separate from or merged with the durable file history. At 214 if a user action that explicitly or automatically promotes the previewed file to a durable file is not detected, the process ends at 217. At 214, if a user action that explicitly or automatically promotes the previewed file to a durable file is detected, at 216 the previewed file is transformed into a durable file, the promoted previewed file is added to the working set, the promoted previewed file identifier is removed from the provision tab, a new durable tab is created and labeled with the promoted previewed file identifier, the promoted previewed file is removed from the previewed file history, the promoted previewed file is added to the durable file history or if the histories are merged, the appearance of the promoted previewed file identifier can be changed to the appearance of the durable file identifiers. It will be appreciated that the subject matter described although described in the context of an IDE is equally applicable to any area in which complex relationships exist among files, including but not limited to three dimensional modeling and computer aided design/drafting applications.
In order to provide context for various aspects of the subject matter disclosed herein,
With reference to
Computer 512 typically includes a variety of computer readable media such as volatile and nonvolatile media, removable and non-removable media. Computer storage media may be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CDROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other transitory or non-transitory medium which can be used to store the desired information and which can be accessed by computer 512.
It will be appreciated that
A user can enter commands or information into the computer 512 through an input device(s) 536. Input devices 536 include but are not limited to a pointing device such as a mouse, trackball, stylus, touch pad, keyboard, microphone, and the like. These and other input devices connect to the processing unit 514 through the system bus 518 via interface port(s) 538. An interface port(s) 538 may represent a serial port, parallel port, universal serial bus (USB) and the like. Output devices(s) 540 may use the same type of ports as do the input devices. Output adapter 542 is provided to illustrate that there are some output devices 540 like monitors, speakers and printers that require particular adapters. Output adapters 542 include but are not limited to video and sound cards that provide a connection between the output device 540 and the system bus 518. Other devices and/or systems or devices such as remote computer(s) 544 may provide both input and output capabilities.
Computer 512 can operate in a networked environment using logical connections to one or more remote computers, such as a remote computer(s) 544. The remote computer 544 can be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 512, although only a memory storage device 546 has been illustrated in
It will be appreciated that the network connections shown are examples only and other means of establishing a communications link between the computers may be used. One of ordinary skill in the art can appreciate that a computer 512 or other client device can be deployed as part of a computer network. In this regard, the subject matter disclosed herein may pertain to any computer system having any number of memory or storage units, and any number of applications and processes occurring across any number of storage units or volumes. Aspects of the subject matter disclosed herein may apply to an environment with server computers and client computers deployed in a network environment, having remote or local storage. Aspects of the subject matter disclosed herein may also apply to a standalone computing device, having programming language functionality, interpretation and execution capabilities.
A user can create and/or edit the source code component according to known software programming techniques and the specific logical and syntactical rules associated with a particular source language via a user interface 640 and a source code editor 651 in the IDE 600. Thereafter, the source code component 610 can be compiled via a source compiler 620, whereby an intermediate language representation of the program may be created, such as assembly 630. The assembly 630 may comprise the intermediate language component 650 and metadata 642. Application designs may be able to be validated before deployment.
The various techniques described herein may be implemented in connection with hardware or software or, where appropriate, with a combination of both. Thus, the methods and apparatus described herein, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing aspects of the subject matter disclosed herein. As used herein, the term “machine-readable medium” shall be taken to exclude any mechanism that provides (i.e., stores and/or transmits) any form of propagated signals. In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. One or more programs that may utilize the creation and/or implementation of domain-specific programming models aspects, e.g., through the use of a data processing API or the like, may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language, and combined with hardware implementations.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.