Git Product home page Git Product logo

psiseprojectexplorer's People

Contributors

alienisty avatar claudiospizzi avatar lukaszgasior avatar mgr32 avatar randorfer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psiseprojectexplorer's Issues

Unexpected exception during editing a file

An unhandled exception occurred in PsISEProjectExplorer:
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at PsISEProjectExplorer.UI.ViewModel.TreeViewModel.<>c__DisplayClass9.b__5(TreeViewEntryItemModel treeViewChild)
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at PsISEProjectExplorer.UI.ViewModel.TreeViewModel.RefreshFromIntermediateNode(INode node, TreeViewEntryItemModel treeViewEntryItem, Boolean expandAllNodes)
at PsISEProjectExplorer.UI.ViewModel.MainViewModel.<>c__DisplayClass10.b__d()
at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at PsISEProjectExplorer.UI.ViewModel.MainViewModel.OnSearchingFinished(Object sender, SearcherResult result)
at PsISEProjectExplorer.UI.ViewModel.IndexingSearchingModel.BackgroundSearcherWorkCompleted(Object sender, RunWorkerCompletedEventArgs e)
at PsISEProjectExplorer.UI.ViewModel.IndexingSearchingModel.RunSearch(BackgroundSearcherParams searcherParams)
at PsISEProjectExplorer.UI.ViewModel.MainViewModel.RunSearch(String path)
at PsISEProjectExplorer.Services.DocumentHierarchyFactory.d__4.MoveNext()
at PsISEProjectExplorer.Services.DocumentHierarchyFactory.UpdateDocumentHierarchy(IEnumerable`1 pathsToUpdate, FilesPatternProvider filesPatternProvider, BackgroundIndexer worker)
at PsISEProjectExplorer.UI.Workers.BackgroundIndexer.RunIndexing(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
--- End of inner exception stack trace ---
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at PsISEProjectExplorer.UI.ViewModel.IndexingSearchingModel.BackgroundIndexerWorkCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Make logging configurable

Currently logging configuration provided by NLog is hardcoded - the configuration should be moved to NLog.config file in module directory to give the user ability to change the logging levels / targets for debugging.

Create Folder Bug

When I try to create a folder inside an existing folder, it will wrongly rename the parent folder instead of create a new child folder:

Steps to reproduce the bug in PSISEProjectExplorer:

  1. Go into a folder, e.g. _Test\FolderA
  2. Right click on FolderA, select "Add", select "Directory"
  3. Type the following as a name, for the '-' please use the numblock key: 2015-10-22_Test
  4. As soon as you have hit the numblock key '-', it will rename the parent folder to what you have typed, in my case to '2015'

I can reproduce it on two devices (Windows 7, Windows 10) with PowerShell 5 and PSISEProjectExplorer version 1.0 (11.10.2015).

Feature: Add "Open in Explorer" to context menu

When selecting a Folder in the Project Explorer pane, the context menu opens a Windows Explorer window showing the contents of this folder, when selecting a file, it opens the containing folder.

git support

any plans to add git support?

I am interested in helping.

does posh-git help?

basic functionality list:

  • modified files
  • staged file
  • stage/unstage
  • commit
  • change branch
  • checkout
  • untracked files
  • add to ignore

etc..

Togglebutton state hard to see

The state of the toggle buttons in the Project Explorer pane is hard to see.
The activated button has a light blue-ish background, the inactive (not disabled) button has a light gray background (see picture).

indicators

FYI: I'm using Windows 8.1

Regards, MindGirl

Should include PS1XML files

When "Show All Files" is turned off PS1XML files should still be shown in the tree view, as they are often part of a PowerShell module.

Exception when loading module

I loaded the new release (1.2) but got an exception when loading the module:

Exception calling "Add" with "3" argument(s): "Cannot create element because an exception occurred with the 
message: Collection was modified; enumeration operation may not execute..
Parameter name: controlType"
At C:\Users\xxx\PSModules\psiseprojectexplorer\PsISEProjectExplorer.psm1:9 char:2
+     $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add($addOnName, [PsISEProjectExp ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException

I tracked it down to the SanitizeWorkspaceDirectories function of the WorkspaceDirectoryModel. I think you need a .ToList() after the where clause.

Regards,

MindGirl

Make ISE not close on unhandled exception

Normally when an unhandled exception is thrown from an ISE module or ISE itself, it closes without giving the user possibility to save her work. A global Dispatcher.UnhandledException handler can make ISE stop closing.
Additionally, current handler erroneously says that each caught exception comes from PsISEProjectExplorer, while it also catches all other exceptions. We can try to guess whether it really comes from PsISEProjectExplorer by looking at e.InnerException.Source.

Exception with untitled.ps1

While working on different computers with the Project Explorer two of them work fine, but one showed an exception when loading the addon.
It turns out that the OnIseFilesCollectionChanged of the IseFileReloader is triggered also with the Untitled1.ps1 that will be created during ISE startup. On the computer where the exception is thrown, the FullPath of the Untitled1.ps1 has no directory name and the constructor of the FileSystemWatcher throws an exception.
The ISEFile class has an property IsUntitled. May be you can exclude untitled files when setting up the file watchers.

Regards, MindGirl

Improve indexing performance

  • index directory structure first, then file contents
  • store index on disk in order not to need to recreate it every time
  • add option to enable/disable parsing files containing DSC statements (if DSC modules are missing parsing takes much time)
  • use thread pool and async/await instead of single thread for indexing

Extend config file posibilities

I have a special use case for the PsISEProjectExplorer module:
In my environment, I synchronize the WindowsPowerShell folder with Dropbox over all my computers, by using a symlink from the documents folder into the Dropbox folder. The PsISEProjectExplorer module is stored in this directory too. My problem now, the config file PsISEProjectExplorer.config is synchronized - but the paths for the Workspace directories are different on each computers.

Would be great if we can extend the config file posibilities:

  • Option 1: Use a second location for the config file (e.g. the user profile folder %appdata%). We then have to define, which file hast the priority.
  • Option 2: Use an environment variable prior to the module import, to configure the config file path
    (e.g. $Env:PsISEProjectExplorer_ConfigFile = 'C:\Path\To\config'). If it is set, this path will be used. Else the default config flle path is used.

I will provide a pull request, but first I like to ask, maybe some has a better idea?

What do you think about that?

Errors parsing XML files

When having .ps1xml/.xml files in a project/workspace, PsISEProjectExplorer v1.2.5 now seems to parse these incorrectly (or at least flag unnecessary errors). Here's an example with the Pester module loaded:

image

Can an option be added to not parse .ps1xml/.xml files?

Crash on load due to access denied on folder

At one point I changed my workspace to a folder on a remote system.
Now when I import the psiseprojectexplorer module, it crashes with an access denied to that remote folder.

That seems like a defect, but the other question is where does it store that workspace so I can tell it to stop looking there? :)

An unhandled exception: System.NullReferenceException

An unhandled exception occurred in PsISEProjectExplorer:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.DependencyObject.LookupEntry(Int32 targetIndex)
at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)
at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action2 originChangedAction) at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action2 originChangedAction)
at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action2 originChangedAction) at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, IList1 otherOrigins, DeferredElementTreeState& oldTreeState, Action`2 originChangedAction)
at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, DeferredElementTreeState& oldTreeState)
at System.Windows.Input.MouseDevice.ChangeMouseOver(IInputElement mouseOver, Int32 timestamp)
at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.MouseDevice.Synchronize()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
at System.Windows.UIElement.Focus()
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextViewHost.b__0(Object param0)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

ISE crashes on Win 8.1 when project root is the users document directory

The exception occurs in FillFileListRecursively of the DocumentHieraryFactory while trying to enumerate the "c:\users[username]\Documents\My Music" folder. On Windows 8.1 at least this folder is a junction. Maybe you can exclude hidden system directories from the enumeration? The file system attributes for this folder are: Hidden | System | Directory | ReparsePoint.

Regards, MindGirl

Add DSL expressions (Pester, PSate, psake etc.) to tree view

The currently implemented display of the script functions in the Project Explorer pane is great. However with some PowerShell modules script authors just defines script blocks to make use of them.
Examples are the unit test modules Pester (https://github.com/pester/Pester), PSate (https://github.com/jonwagner/PSate) or the build automation tool psake (https://github.com/psake/psake).
As it would be tedious to maintain a list of the commands for these modules, could you think of a way to make it extensible by the user or simply showing any function / cmdlet in the tree view that uses a script block?

Best Regards.

MindGirl

Search issue - terms with preceding bracket are not found

This is unintended consequence of #55 released in 1.2.5 - if we don't treat special characters such as bracket as separators, they will make part of Lucene terms, thus making strings like '(Invoke-Command' unsearchable.

Thus 'special characters' part of #55 will be reverted in 1.2.6.
Note because of that if you search for filename.txt, it will be equivalent to filename txt - so also strings like 'filename.doc filename2.txt' will be found. If you want to search specifically for words containing special characters, you will have to use regex mode.

List of characters treated as separators:

. , : ( ) [ ] { } \ / ` ' "

Stop searching for workspace when PSD1/PSM1 found

I have PS1 files higher up in the directory structure, so it this extension chooses the wrong directory (by default) when determining the workspace root. Modules are, generally, analogous to projects so it seems best to assume a module directory (a directory with a PSD1 or PSM1 file) is a workspace root.

Powershell ISE locks up after save.

I encountered another issue that after a longer period working in the ISE with the Project Explorer loaded, the ISE locks up (Thankfully after saving the file ;-)).
I then started the ISE with the debugger attached and paused it when the ISE locks up.
The debugger stops in OnIseFilePropertyChanged of the IseFileReloader when locking the PathsToIgnore on line 93.
The Threads window showed a different thread waiting in OnIseFileChangedBatch, locking the same collection.

I have no steps to reproduce the issue, but I hope the Information above helps to fix the issue.

Regards, MindGirl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.